We are meant to be the guardians of the earth, showing mercy, especially to innocent animals. We have a duty to care for them. Therefore, even if you became najis after rescuing the animal, this is of lesser importance than showing mercy and humanity towards a sentient being that is suffering. You can easily become tahir again by purifying yourself after touching the animal.