“That may, or may not, work. Depending on the rules and codes. If its required after a certain date, and youre not able to install it yourself, then youll have to hire a contractor, who will have to pull permits (yeah, I know, cash is king). Those permits will necessitate inspections, and they may not like your old-style water heater being installed after the cut-off date.”
If I install the hot water heater myself .... Who will know?
That's the issue. If you can, go for it. If not, you'll have to hire someone. That's why I said if you're not able to install it yourself...
That being said, in most cities today, the city will require a permit for a water heater. I can't remember exactly how it went, but where I live (Rio Rancho, NM), the Lowes wouldn't even sell me a gas water heater (electric may be different) out the door. Had to have an installer, and permit/inspection lined up.