Are you the DM?
If so do what seems right to you. In general, anything with an intelligence score 3 or higher probably should be eligible for class levels although in some cases this would be pretty rare.
I should say that I even disagree with the rule that animals can't have intelligences above 2. For one thing, this doesn't represent the full range of intelligences possible in animals. For another thing, this in no way represents how animals are generally made more human in stories. You can't do something like the Grimm brother's story 'The White Snake' if you think animals never have intelligence above 2. Heck, even in The Lord of the Rings, there is a scene with a fox thinking things to himself.
So I typically tend to divide intelligences:
-: Most insects, mussels, jellyfish, etc.
1: reptilian intelligence, amphibians, smarter insects and spiders
2: most herbivorous mammals, some jumping spiders
3: most carnivorous mammals, cuttlefish, many birds
4: crows, cats, non-working breed dogs, octopods, whales
5: elephants, dolphins, smarter dogs, most primates, some parrots
6: brighter apes, such as gorilla and chimpanzees
And of course, there can be exceptional members of the species with even greater intelligence.
I generally advance animals with HD, but I wouldn't at all object to adding class levels to a particular important animal NPC. So if that war hound you bought at first level survives long enough that it becomes an NPC in its own right and seems to earn it through heroic deeds, I might add a level of fighter to it. Or if you buy a smart horse and it too manages to become memorable, then it might gain levels as well.
In my current game there is a house cat that is among other things, an 8th level Shaman.