If you're in a Western country, there's no need to worry at all, there's both animal protection laws & stringent health inspections. There are cases of individual Asians charged for catching & eating dogs & cats, but no proper Asian restaurant would be stupid enough to risk their license. For discussion purposes, say it's theoretically possible for such illegal transactions, they'll definitely only sell such meat to regulars who specifically order it, never to the general public. Your unfounded fears are just based on trite racial jokes. There's also plenty of food eaten by Westerners that Asians & Africans find disgusting.
If you're travelling in an Asian country, then maybe you need to make sure you understand exactly what you're ordering (and plenty of other Asian countries besides China eat dogs & to lesser extent cats eg. in South Korea, Thailand, Vietnam, Cambodia, Laos) but it's generally upfront ie. they won't disguise it and serve you exotic meat when you specifically ordered chicken. Any problems would be miscommunication, or doing something stupid like "I'll have what that table ordered" or simply pointing hopefully to something on the menu.
Although Westerners make a big deal about animal rights & domesticated pets, it's really about which 'lobby' has a bigger voice. There's an impressive army of dog & cat lovers to protest against their consumption, but what about other pets like fish, birds & various rodents ? Anyone making a big hoo-ha over rabbit pie? You could even argue that many prized cows & pigs became family pets for farmers who still ended up slaughtering them, notwithstanding any emotional ties raising them from birth.