Kevin Welcome. You'll have to give us way more info and some picture. This is a Bertram yes? MY, SF? There are a lot of knowledgeable Bertram owners on the forum. Be patient, they will give you good insights.
Sorry, Its a 54ft 1985 Bertram sport fish . It had a washer/dryer at one time. The hallway has a narrow spot 20" wide. I'll post pictures later today.
Builder put that stuff ( motors, fuel tanks, generator , mechanicals, etc.) in before they lift and set the deck/topside onto the hull makes building the boat simpler and faster otherwise. Unfortunately you will have to take it apart get it past the narrow spot and put it back together and set in place, OR, find a unit that will fit through the narrow spot. I would not advise to start making cuts into the boat's bulkhead etc., to get it to squeeze through btw....
I managed a 54' Bertram, I'm trying to figure out what room you are talking about? Work room? Is it somewhere inside of the boat? If so, where?
Replacing appliances on boats is always a challenge. Sometimes you have to remove trim, handles, and doors... every inches count. And find the smallest possible unit although 20” seem hopelessly narrow
This seems to have one in the following location: "Below and to starboard is guest stateroom featuring upper/lower bunks, quilted coverlets and throw pillows including a full-size hanging locker, built in rod storage under lower bunk. Plenty of storage also. This stateroom has its own air conditioning system with SMX computerized controls, separate stereo system, reading lamp, drawer stowage below the bunks. Going aft is private head w/full size, stand up shower, Corian sink counter tops, and mirror with vanity. Behind maple locker doors is an over/under Whirlpool washer and dryer." Clink on the link and they have a picture https://www.**************/boats/1997/bertram-convertible-3576861/
There are small, typically european appliances out there. Just have to search and review comments, reviews, etc. Posting a concept link only, not vouching: https://www.amazon.com/dp/B0092JSGXI/ref=dp_cerb_2 Problem with these types of units will be sheets and towel drying, but they'll do a reasonable job for clothing in small batches.
I have a fairly small dryer aboard my Post. Over the years We have found that directing a fan into the space while operating assists in the drying capacity
If you can't find a counter depth one that's shallow enough to get through the hallway, you're going to need to speak to a really good appliance guy, find a unit you can completely disassemble to fit through the hallway and re-assemble. Which I would not recommend due to price and issues involved with it. The easy route would be to have someone frame one of the all in ones somewhere into the salon or galley somewhere.