With the right spray paint - yes. But, you can't use any spray paint. I know Testors spray paint is safe. But its expensive. I've heard Krylon Fusion is safe, but have never verified. Its the 'tones in the spray paint that eat the foam. Acetone, Keytone, whatevertone...
Airbrushing doesn't use any of these, so it is perfectly safe.