Please note the Mummy Lord in MM1. It's just a Mummy with 10 Cleric levels. Its spells are a Special Attack, just like everyone else's. See also the Troll Hunter, a Troll with Ranger levels. Again, Special Attack.
So even for spells gained only by class levels, the ability to cast spells is a Special Attack.
Note that there is one funny exception to this... some later books place spells as a Special Quality. That's a bit strange, but irrelevant for our purposes, because Special Qualities and Special Attacks are just subcategories of Special Abilities. So the same necessary rules apply.
JaronK