6HP is pretty small for a 38 foot boat. I would go 15 to 20 HP. You will need an outboard bracket for your transom, installed low enough to keep a long shaft outboard's prop deep enough in the water to avoid near surface cavitation. You may want a prop change, too, lower
pitch and bigger diameter. The outboard will be down pretty low and you won't be able to steer effectively with the outboard tiller. No big deal making way, but a big deal when docking. Going down the channel you can steer with your rudder just fine, with the outboard locked in position. You will need a way to take it out of gear or put it in reverse. So, you will at least need control
cables for gear shift and throttle, if not for
steering. Also you will want a davit for lifting your outboard up off the bracket and into the cockpit or onto a
storage bracket.
Your outboard mount needs to be a good one, designed for a heavy outboard. It will be awkward enough just reaching down and unlocking it. Most good mount systems can
lift it all the way up out of the water using heavy springs. That will make it easier to attach whatever lifting sling you rig together for bringing the outboard up into the boat.
You will have to decide how and where you will store your gasoline, too. Not a trivial consideration.
All in all, it is not really super practical. In an
emergency you can make up the
dinghy on the hip, or else tow your boat astern from the dinghy. But this isn't an emergency.
It is almost certain that repairing or possibly replacing your diesel will be overall the better way to proceed. It could be very handy to have an outboard mount and control
cables set up so you COULD push your boat with your outboard, but I wouldn't be a fan of relying on the outboard as primary
propulsion. When I bought my old
Cal 2-27 after Katrina, the Atomic 4 was not running. I wanted to go sailing the next day, so I bought a mount and a new 6HP Tohatsu. Even on that small of a boat, I found
steering with the outboard tiller to be very awkward. It got me in and out the harbor, but it was a PITA. Eventually I got the Atomic running nicely, and later when the
fuel tank sprang a huge leak, I replaced it with
electric propulsion, I kept the outboard mount and the 6hp as backup for quite some time, and I started it and ran it a little every month or so. But I was glad I never had to use it. Your boat is quite a bit bigger than the old
Cal so even more difficult to manage an outboard. In dead calm conditions and protected waters, you could literally use a trolling motor or use an oar as a paddle, but that will be like 2% of your powered operation.
If your diesel is so far gone that it can't be salvaged, you could replace it with a Beta diesel fairly (I should say relatively)
cheap, or with a used or salvaged diesel of similar power and footprint. Or go
electric. One of the biggest misconceptions in yachting is that EP is expensive. I converted my Cal to electric for about $2300 including
batteries.For around $6k you could have a fairly nice EP setup, and for a bit more, have enough
solar so that over the course of a voyage you could tank up again on the propulsion bank charge, from the sun. You also of course avail yourself of any chance to charge from
shore power. All things considered, it is better than an outboard, and possibly a good enough fit for you, to make it more attractive than replacing your kaput diesel. But if your present diesel can be repaired, that, IMHO, is by far your best option.
CAN you use a 6hp outboard to get your boat to open water where you can sail? Yeah, if you pick the
weather carefully, and nothing happens. CAN you then dock your boat with your 6hp outboard, at voyage end? Yeah, though there is always extra uncertainty coming into an unfamilar harbor or even an unfamiliar slip, and you still have to pick your
weather, maybe hold up on the hook for a day or a few. SHOULD you, is a different question. My OPINION, knowing only what I know about your situation, is you should not and I would not. But my opinion is worth just about what you paid for it so don't let me stop you.