It is only Haram to have a dog if it is for being a pet, other than that the dog is ok.
مَنِ اتَّخَذَ كَلْبًا إِلاَّ كَلْبَ مَاشِيَةٍ أَوْ صَيْدٍ أَوْ زَرْعٍ
انْتَقَصَ مِنْ أَجْرِهِ كُلَّ يَوْمٍ قِيرَاطٌ
That the Messenger of Allah () said: "Whoever acquires a dog - with
the exception of a dog to guard livestock, a hunting dog, or a farm
dog - each day a Qirat is deducted from his reward.
But it is also good to take care of animals, and dogs are animals and there is a reward for taking care of animals.
Yahya related to me from Malik from Sumayy, the mawla of Abu Bakr from
Abu Salih as-Samman from Abu Hurayra that the Messenger of Allah, may
Allah bless him and grant him peace, said, "A man was walking on a
road when he became very thirsty. He found a well and went into it and
drank and came out. There was a dog panting and eating earth out of
thirst. The man said, 'This dog has become as thirsty as I was.' He
went down into the well and filled his shoe and then held it in his
mouth until he climbed out and gave the dog water to drink. Allah
thanked him for it and forgave him." They said, "Messenger of Allah,
do we have a reward for taking care of beasts?" He said, "There is a
reward for every one with a moist liver."