Yes, there are tankless water heaters designed for boats and there are several available on the market. The problem is, that for the most part, the electric versions simply don't work! The 115 volt models are virtually useless, and the 220 volt models draw so much power that they really aren't practical onboard a boat.
The only ones that are any good are those that are propane-fired. However, most people don't want propane on their boats, due to the explosion hazard that is associated with it.
So for the average boater, the heated storage tank type of water heater is the most practical.