If the rust enters your blood stream through an open wound then it can cause tetanus.
But just touching rust without an open wound will not cause tetanus.
You can only get infected by stepping on a rusty nail or getting cut with a rust piece of metal and if you've had a tetanus shot within 10 years and it hasn't been 10 years yet since your last tetanus shot then you don't need another tetanus shot until 10 years have passed.
If you haven't had a tetanus shot then you need a tetanus shot after getting cut with a rusty piece of metal or stepping on a rusty nail.