You can do it, but it's not the greatest idea in my mind. That engine under light load makes very little heat, so it would have to run quite a while to heat a tank. Also a good chance of undercooling the engine unless you throttle the flow, again due to it making little heat.
And since it is running, just let the electric element do the heating. The incremental increase in fuel burn is very small.
It's a pretty big advantage to have one tied to a main engine as it removes the need to run the gennie at all.
Another is that an air pocket in the heater loop creates a real risk of air loading the circ pump and creating an overheat. Personally been involved with two ruined Yanmar prop engines that cooked and root cause was air in heater loop introduced when coolant was changed.
On my personal boat I tied neither gennie or main to the WH, just to keep things simple and as low risk as possible. I find in the summer there is very little need for hot water as the main tank gets warm enough (engine room, my fault there) and if I do want hot water, gives the gennie a chance to run under a decent load for a half hour.
But it certainly can be done. Depends on how you use the boat.