Technically, it's supposed to work that way, but in reality, the abilities defined in the schools of magic stop working.
Added 3 hours and 6 minutes ago
I tried to turn summoning the Avatar of Death into a spell (it doesn't work). You can learn it, but you can't cast it. I won't experiment further because anything else will be worse; summoning the Avatar of a god in a city of religious fanatics.
If I had joined the conversation a bit earlier, I could have saved you some time. I already had a discussion about experimenting with magic and abilities in my own thread.
I can suggest that you don't abandon the idea, and here's how.
1) You can, like me, simply add a hero to the Faction with a similar special ability and edit it. Let him be some kind of "cult leader" or something like that.
2) Another option is to give the Avatar to all the heroes of the Faction, similar to how all Necromancers have Raise Dead from the start. It would be a kind of "core mechanic." But then you should also adjust the balance.
*) If anything, the special ability for the Avatar is, in essence, not very useful. And nothing prevents you from adding it to the spellbook for all the necessary heroes, even without changing the special ability. If necessary, you can only add a description to their specialization about the possibility of invoking an ancient god.
*) Again, the Avatar has a number of interesting mechanics, for example, that upon death, it burns all the hero's mana or cannot be summoned for several days (as if it is regaining its strength).
In my case, for example, the hero spends all his remaining mana to ensure the evacuation of his creation from the battlefield, and then his mega-golem is simply repaired for a couple of days.
Added 4 minutes ago
By the way, what would be invaluable for the Avatar is the ability to define several forms for different levels. Something like an evolution as it gets stronger... but unfortunately, this is not provided. :(