Uline (and others) make dual-voltage refrigerators. Some work better/last longer than others, but it's a crap-shoot. That's your best option. Boat fires are a real thing, and many are started because of electrical wiring shenanigans. To wire up your existing outlet with a dual source you'd need to set up a way to switch between them.
Most boats with an inverter often have a switch that controls this. Flipping between Shore/Generator power (often managed through a different switch) and Inverter. This allows flipping "everything" in the AC panel over to Inverter, rather than have a piece-meal circuit-by-circuit jerry rig.
So you'd need to add AC wiring and 2-way AC switch to handle changing your refrigerator's AC source. Bearing in mind, as others have pointed out, a refrigerator will run batteries flat in pretty short order. That and the inverter itself is going to drain some amount of wattage making AC (dissipated as heat, so be sure it's got airflow available).
It'd also be a good idea to have a voltage cut-off module to prevent the inverter from drawing down the batteries beyond a certain point. This way you can lessen the chance of ruining the batteries.
By the time you spend for all this you may be approaching the cost of a proper AC/DC refrigerator. Or, perhaps more useful, a very good cooler like an RTIC, MaxCold or the like.
Hate to rain on a parade, but I've been down the road of not-enough-battery-capacity and refrigerators... and learned to use a cooler instead.