That would depend on how your whole system is plumbed. You just need to make sure that the system was not dependent on the outflow from the water heater (if that makes sense to you). But if you don't need the water heater then you would definitely want to disconnect it as it would be a potential leak with possible catastrophic problems. The best way to plumb these types of systems is a separate heat exchanger
just for the water heater in which case you would have to remove that heat exchanger and replace it with a hose from the inlet to the outlet side of the engine
coolant flow. If the engine
coolant flows through the hot water heater and then back to the engine you still have to maintain that flow for the engine itself after removing the hot water loop. Otherwise you just block the engine coolant system which will overheat the engine almost immediately.