Please show a schematic of how you have this hooked up; it makes it easier to suggest solutions.
Yeah, that might work; a simple CMOS switch. Doesn't even have to be DT; SPST would work as well, but both types are common. But to be able to see if this is a good solution, I'd want to see a schematic.