HI Carpet cleaners can remove rust from the carpet as they are proffesionals in this work.
So you should try them they will solve your problem if you want to remove the rust yourself then you can try this
i hope it will work 4 u..
For rust on the carpet, put lemon juice in a spray bottle, either concentrated, or fresh squeezed, but don't dilute it.
Wet the spot well, then blot with a clean cloth. Don't rub or you'll spread the color around the fibers.
If it's not completely gone, try blotting with a weak solution of six drops dish detergent to four cups of water, and use a damp towel.