The paint, unless the formulation has changed, should be fine.
The propellent, unless it has changed, will melt foams.
So, spray from far enough away that the paint hits the foam - after the propellent has dissipated.
I've used Rustoleum spray paint on PVC tubing that went into the tank and never had any problems; of course I did let it dry for a few days. Small pieces did flake off over time, but that never seemed to hurt any plants or critters.
Im going to get started in the morning, i got the brownish stone textured krylon fusion spray paint.
I plan on spraying the styrofaom until i like the shade of brown i have on the foam, then i have some small river rocks i got from petco for like 0.70 cents a 5 lb bag that i have plenty of that i am going to press into the foam and silicone them on to give it more of a natural look. I then will glue java or christmas moss to the background in various places to add more of a natural look as well.
I did something similar that didnt turn out as well when i first set up this tank with crafters canvas where i siliconed these same rocks on to it then glued the java moss on it. The only problem was that you could see the crafters canvas and light in between the rocks. Oh and that i didn't think of a way to attach the wall to the tank....lol. Well i will make sure i have it right this time!
I believe Aquatic Ecosystems sells a marine safe epoxy type paint. They are at www.aquaticeco.com. Besides you can try Krylon. It is totally is aquarium safe. Plain old spray can Krylon but I have only used flat black to hide filter tubes against a black background. I have about 3 years of professional experience as an aquarist in private business and at SeaWorld so this is backed up with a lot of practice.