We have a few electric ferrys in Denmark, so it’s certainly possible, but they obviously aren’t charged by onboard solar or wind power.
https://spectrum.ieee.org/transportation/marine/happiness-is...
It can cruise purely electric, although with just 100 kWh of battery capacity, the net result is a 30% reduction in diesel consumption.