Plugging compressor into 240v dryer plug (NEMA 10-30R)
First, a few things about this situation. 


NEMA 30A and 50A receptacles are not built for frequent use.  If you are swapping plugs in and out regularly, the receptacle or plugs are bound to fail.  
Dryers and ranges hooked up via NEMA 10 have a very dangerous failure mode. If there's any problem with the neutral wire between the appliance and the panel, the chassis becomes energized at 120V. This is legal because these large appliances are rarely moved and rarely plugged/unplugged.  As such these connections are not legal for new installations. 
Despite much searching, we here have found nothing in Code which prohibits putting two receptacles on the same 30A circuit.   
Retrofitting grounds is only legal at existing receptacle sites.  You cannot install a receptacle in a new location and retrofit ground to it. 
Because you are renting, you need actual permission from the landlord. Failure to obtain it is grounds for eviction. 
Electrical work on a rental property usually must be done by a licensed electrician.  That does not apply to power cords on appliances. 
"Belt and suspenders" doesn't work with neutrals and grounds.  You must not have 2 places neutral ties to ground. 
Hokey-dokey patchwork is absolutely out of the question.  It will create serious liability for both you and the landlord.  Further, the rules of this forum require code-compliant solutions. Don't violate Code - seriously. 


So here's what that adds up to.  

I know you don't want to change the receptacle, but NEMA 10 is so dangerous, especially with frequent plug changes, that it's really time.  So I'm going to ask you to make the big leap. 

From discussion, it sounds like retrofitting a ground wire will be logistically easy to do, with nothing in the way.  This can be a simple bare #10 wire, installed using normal wiring methods.   The new NEMA 14-30 receptacle will replace the old 10-30 receptacle.  The hots and neutral will transfer over to their same terminals, and the ground pin gets the retrofit ground.  

The retrofit ground wire then goes to one of these places: 


The service panel's ground bar
To a proper junction point on any grounded circuit whose ground wire is 10 AWG or larger back to the panel
To a ground screw in any steel junction box which has all-metal conduit all the way back to the panel (metal conduit is a legal grounding path). Junction boxes have a threaded #10-32 hole for a similar machine screw.  You can also use a bolt and nut.  Don't use sheetmetal screws or nails. 
To any part of the grounding electrode system, which is the bare wire(s), stranded or solid, which come out of the service panel and go to ground rods, water pipes, etc.  Do not cut these; clamp to them with a "split bolt".  Do not clamp to a water pipe. 


Then you'll need to get the manual for the dryer and follow its instructions to change the dryer cord to a NEMA 14-30.   I was looking for a way to avoid this but I can't find one.  A neutral-ground jumper needs to be removed from the dryer; failing to do so creates a fire hazard. 

You'll also need to change the compressor socket to a 14-30 also; obviously.  In its case you will not hook up the neutral wire.

Now if you really wanted to, you could install a second 14-30 receptacle right next to the dryer (or somewhere else), that would eliminate the frequent plug changes. 

Now because you are in a rental unit, the landlord needs to approve it and most likely, because it is a rental unit, local code requires that an electrician needs to do the work.  There is absolutely no downside for the landlord; switching to a 14-30 receptacle makes the unit safer.  

Electricians only need to hook up wires. They are not required to clear paths for wires, place ground wires, design the circuit or do other preparatory work that is beneath an electrician.  I am guessing this will be a quickie job.