That’s how it is done in, for example, boats as well as other places where you want to extract heat to a lake or to a sea.
You have your typical nice and clean coolant circuit that circulates through the engine, and then through a heat exchanger, you give that heat out to the sea water. This way the heat exchanger becomes somewhat sacrificial and you replace only that if it gets destroyed. And you don’t have to harden every single surface for sea water and all the creatures that come with it.