The Prophet ﷺ said that whoever keeps a dog, other than one for herding or hunting, loses a measure of his reward each day. On this basis most scholars discourage or forbid keeping a dog for company, but allow it for hunting, protecting livestock or property, and, by analogy, for needs like guiding the blind or search and rescue. The Quran also permits eating what trained hunting dogs catch for their owners. A report in Muslim says that when a dog licks a vessel it should be emptied and washed seven times. The Malikis hold that the dog itself is ritually pure and that the washing is an act of obedience, while the other schools hold that the dog, or at least its saliva, is impure.
None of this allows cruelty. Islam teaches kindness to every animal: the Prophet ﷺ told of a man who was thanked by Allah and admitted to Paradise for giving water to a thirsty dog, and of a woman who was punished because of a cat that she locked up without food or water. So whatever a Muslim's view on keeping dogs, harming, starving or neglecting any animal is a serious wrong, and feeding or giving water to a stray is rewarded.
Cats are widely kept by Muslims, and the warning about the woman who confined her cat shows that a pet is a trust to be cared for. Other pets such as fish, rabbits or birds are generally permitted when they are well looked after. If a Muslim friend prefers that your dog stays off the sofa or out of their prayer space, they are following these rules, not showing dislike for the animal.