sounds like you need to install the cold inlet line higher than the top of the heater. come out of the tank and run it up to a higher point than the top of the heater and then install your watts N-36 or equivalent vacuum relief valve on the
proper tee fitting. If I am understanding your question correctly. you can also install a swing gate check as well for further protection.