Technically yes, as long as the actual edge is rust free the razor will shave. But a) rust spreads and b) rust around the pivot will eventually affect the pinning and the razor could start flopping around loosely. Plus it looks terrible.
A rusty car might drive, but you dont walk out onto the driveway and think "Yep, thats the car I want to drive."
What I'd do is unpin the razor and clean all the rust off, then repin and make sure I kept the blade dry.
Rust is not something you want on your razor.