There's a rule about this for summoned creatures. The "Spell Description" portion of the SRD says this about Summoned creatures:

A summoned creature cannot use any innate summoning abilities it may have, and it refuses to cast any spells that would cost it XP, or to use any spell-like abilities that would cost XP if they were spells.
This is true for Summoned creatures only. Called creatures, or creatures you encounter normally, don't have that.

There is a line in the "Monsters and Class Levels" section that might apply.

Monsters And Class Levels
If a creature acquires a character class, it follows the rules for multiclass characters.

...

Level Adjustment and Effective Character Level
To determine the effective character level (ECL) of a monster character, add its level adjustment to its racial Hit Dice and character class levels. The monster is considered to have experience points equal to the minimum needed to be a character of its ECL.