"Unit morale dogs" were pretty common, and
usually overlooked. A lot more common on the smaller bases. There were some charities to actually raise money to legally import them to the US afterward. There were also rabid dogs which bit people, got shot, got their heads cut off, and then got tested by the vets (including running them through CT machines when people got bored), so it really depended on behavior and context. I never saw cats in Afghanistan or Iraq, strangely, only dogs.
The Australians had a pet called Stretch at one of their bases in Hellmand/Kandahar area. On the cage, it said "I may look cute and cuddly, but I'm a fucking mongoose!".