I'd be careful with compressed air in those things. Once the resistance force is removed, the air will still be applying force, essentially setting up a small weapon. If you go with an incompressible fluid (such as brake fluid), then the whole thing is a little safer. When I remove brake pads, I unbolt the caliper from the pivot arm, and then squeeze the brake handle until the pad comes out. You generate much more pressure that way than with typical compressed air, so it is bound to move.
Is that the piston you were talking about though? I thought you mentioned the master cylinder (on the handlebars). If you are rebuilding the whole thing anyway, then just shove it out with a screwdriver. Be careful about scratching any surfaces inside though. Some PB Blaster will help too.
Camelman