Adding new 240v 30 amp outlet by tapping into existing NEMA 10-30 outlet box
You need to see if there's a ground inside the box

For your application, equipment safety ground MUST be separate from neutral. let's examine the cases. 

There is neutral and a ground wire (or metal conduit)

The NEMA 10 does not connect to this ground. 
You can extend off this outlet by tapping the two hots and ground (and neutral if your charger needs it). Smash the NEMA 10 socket.  Cover it with a blanking plate; you can normally have multiple 30A sockets, but not with EVSEs.   

There is a bare stranded neutral woven around the other wires

This is the only kind of cable that was ever allowed to use a bare neutral.  You can go one of two ways here. 


Re-designate that bare wire as a ground wire, and you will be permanently unable to ever use that cable to power any electric dryer.  This can ONLY power a NEMA 6 socket. 
Keep that wire as neutral, which is grandfathered, and retrofit a ground wire.  Make sure they don't touch! 


3-wire cable, but the neutral is bare

This cable was illegal to feed a NEMA 10 at the time it was installed, and therefore is ineligible for grandfathering.  Because the bare wire is illegal to use as neutral.  It must be re-tasked to be ground, and can never supply a dryer, only a NEMA 6.  

3-wire cable, white neutral (or braided bare neutral as mentioned earlier)

You cannot tap this. Period.  End of subject.   It is a shame, if you woke up one day and found that previously a ground had been retrofitted, then you could have tapped it.  But no luck. Sorry!

If you think you can retrofit a ground and immediately tap it, in one step, no... But my suggestion is "sleep on it" :) 

Retrofitting Ground

A separate ground wire can be retrofitted.  It can run on its own route. It only needs to reach any of the following: 


the service panel this circuit is powered out of, obviously
any junction box  with an all-metal-conduit path back to the service panel
any junction box with a #10 or larger ground wire back to the service panel, such as a water heater or air conditioner. 
any part of the Grounding Electrode System, those copper wires that come out of the panel to go to water pipes or ground rods.  


Change the dryer receptacle to NEMA 14-30 at this point for plausible deniability that the ground retrofit was unrelated work.  You must leave the 14-30 disconnected because you can't have other outlets on an EVSE circuit.