Need drain for water heater pressure relief and HVAC condensation
In the 2015 International Plumbing Code, R504.6 explains the requirements for hot water heater discharge pipe. It looks like you could install something similar to a clothes washer standpipe as long as the hot water heater discharge terminates less than 6" and more than 2x the pipe diameter above the standpipe. By the way, #6 "not to be trapped" refers to the pipe connected to the hot water heater, not the standpipe or floor drain.