If you do not have shore power then you may be able to use an inverter that is not Marine Rated (UL458), this is not something that I would be able to comment on definitively.
If you do have a shore power connection then YES it MUST be a "marine/mobile" inverter.
UL458-listed inverters have an internal automatic neutral-to-ground switching relay. This relay allows for neutral to ground bonding to occur when the inverter is in off-grid DC to AC mode, it also separates neutral from ground at the utility power service if it is connected to a utility hookup. It does so because, in mobile power systems, neutral is bonded with ground.
ABYC E11.17: ..."The shore grounding (green) conductor is connected, [...] from the shore power inlet to [...] to all non-current carrying
parts of the boat’s AC electrical system, including the
engine negative terminal or its bus."
ABYC:
31.6.5.3 Inverter (inverter/charger) integral switching shall switch:
31.6.5.3.1 all ungrounded conductors, and
31.6.5.3.2 the grounded (neutral) conductor from ground