A 50a 250v welder plug will absolutely work with an average air compressor. I did it for a long time.
Code and what mechanically works are two different things.
My WABCO compressor has a 5hp baldor motor rated at around 27.5 amps. It is also a 184 frame with a 1.375" shaft.....it is an older motor. It flashes 165 amps at start up across my green lee and klein meters.
Just do not unplug it or plug it in without the compressor switched off.
When I rebuilt the garage, I installed a motor starter and #6 wire directly to the air compressor and direct wired my tig welder on #4 wire and a 100 amp breaker. It can pull 104 amps at 230v per the nameplate........voltage was listed lower in 1963 when it was built. When it had a 50a 250v plug, I had to avoid welding at full output (460 amps).
For the OP, electricity isn't magic. do some reading or watch some videos on the basics. Electricity is very mechanical, just like plumbing on a vehicle. You just need to know some basic rules and how it works and how to fit 10 pounds of wire in a 5 pound box. With years of doing it professionally, I figured it out.
If you are not in dire need of the air compressor, research first. You could do better than the hack you already paid or at least know how a pro should do it.
Decide whether you want what works or what code requires....code is easy to do in your case, but replacing that conduit with cord is something you could do dyi that is very easy.
With the power off.....assuming that is a sub panel and there is a breaker upstream to shut it off, it is easy mechanical work. if you can work off the receptacle box and not get in the panel, then it is easier yet.
The problem is finding a sparky or good all around construction guy who will do it right and not charge an arm and a leg. It is very basic stuff. On one side you have wasted money if you hire someone and on the other you have some liability and potential for injury or fire if you screw it up bad. Tough call.