I would be worried about the outside of the piston which is the surface the caliper seals itself on. If you can pump the piston out a 1/2", you can peel back the rubber and inspect the surface. If the surface is rusty/flaking, it is probably gonna be a source of leaks when you replace the pad. The seal is probably still on a clean portion of the piston if it functions.
If you have access to a lathe, you can polish the piston, but the rust might have penetrated the outer chrome coating so any new polishing won't last like a new unit. You might be able to buy a new piston, but a reman caliper would be less hassle if you are not strapped for cash.
Rust inside the piston, it probably is not an issue. The piston walls are pretty thick, it probably won't collapse. You might want to sand the pad end of the piston flat so pressure is more evenly spread.