the exhaust will have to exit the building regardless. also the water doesnt touch the smoke or flame path, they typically have thier own chennels, and most people who heat water in this way use a copper coil. the water in inside the coil, and the flame is outside.
i remember a fellow forum member "FStyles" ran his exhaust through a
hot water tank, and used the water as the mass, i thought it was a good idea. his post is called "first
rocket stove heats water" or something like that, check it out maybe. water as a mass retains heat for quite a while. if i turn off my propane
hot water tank, the water stays hot for days. so water can make a great mass, if you can somehow efficiently capture it.
also many people whit aquaponics and greenhouses use wood burning rockets to heat water. however, you will need to understand how these stoves function, and you will need to exhaust outside, and create a coil or heat exchanger so the exhaust doesnt contact the water directly, but rather via thermal conductivity like a copper coil.
i suggest you simply look at some of the
greenhouse aquaponics stoves here on permies, and get a better understanding of how these rocket stoves work, and how to properly exhaust them.
good luck