I used my Druid power to turn my animal into an anthropomorphic one, and a spell of permanency to make it permanent. Is it possible for my animal take levels in an NPC or PC class?
Animal companions advance only as animal companions; NPCs (including former animal companions that are permanently anthropomorphic) gain levels only by GM decree
A druid's animal companion advances only as an animal companion. An animal companion that's the target of the spell anthropomorphic animal advances as an animal companion. (The spell doesn't change the creature's type, and the rules for animal companions with Intelligence scores greater than 2 can be found here.) So far as I am aware, only PCs gain XP and, therefore, class levels: "As player characters overcome challenges, they gain experience points" (emphasis mine). Once introduced into the campaign, NPCs' levels and Hit Dice are fixed unless the GM intervenes. (Although some options—like the spell awaken—are available to player-characters for mucking about with NPCs , these are rare.)
A former animal companion who's been the victim of the spell anthropomorphic animal and the spell permanency would be, with the GM's permission, an interesting choice as a druid's cohort gained from the feat Leadership, although the looming threat of reversion due to an errant dispel magic can't be ignored.
They don't need to be anthropomorphic. There's no minimum attribute requirement for any class in Pathfinder, nor any prerequisite for thumbs. Levelling in this case should be handled however your DM normally handles NPC levelling, which varies widely from group to group. In some games only people who are human enough can take class levels, and in these games the difference due to the spell may make such levelling possible where it previously wasn't. I object to that explanation on the grounds that it perpetuates an oppressive discourse, however, and suggest strongly that you find another one; either allowing levelling before the spell as well or not allowing it afterwards either.