Possibly you could enable it, force UI key (force the key for whatever the spellbook's hotkey is), cast the spell, and then disable the spellbook but I haven't tried it. =P Although, you would have to track somehow when they want to cast the spell so that idea is partially flawed already.
Just a thought. Otherwise, I think the whole "hidden spells" thing has been an urban legend. People have talked about hiding a spellbook with a spell in it, and casting the hotkey for the spell to trigger, but as far as I know, that doesn't work.
EDIT: Yeah, I tested the whole hotkey myth thing, and it doesn't work. My suggestion is also very inefficient. You need at least ~0.56 seconds for the spell to be actually cast so it can't be instantaneous, and the unit must be selected. Yeah, you can work around it with a lot of work and illusion but it is overall not worth it.