You can have up to 3 of the same pet type, it does not matter what rarity they are, once you have 3 you can not get more.
At this point I had 3 different rarity of Stormwind Rat.
There is no visual way of seeing the difference of quality of pets, the color(skin) of the pet has nothing to do with the rarity.
But once a fight has started you can see on the pets stats how rare it is based on how high its stats are.
A poor quality(grey) level 2 Stormwind Rat will have about 180-185hp(seen to the left) so I expected the one to the right to be an uncommon(green), But it turned out to be a rare(Blue):
In your pet window you can see the difference in quality by the border color.
So far I have run in to 4 types of quality: Poor(Grey), Common(White), Uncommon(Green) and Rare(Blue).
Based on lack of achievements there is no Epic(Purple) quality pets in the game at this time. There is achievements for catching Rare pet(s) but not for anything higher.