"That question should be asked to the teacher, not me." OR "That question should be asked from the teacher, not me."
Verbs of speech, like ask, answer, reply, say, or tell, are very complex and can address a number of details, which may or may not correspond with other verbs. Since these are words about words, they have plenty of recursive properties, and quite unique grammars.
Say, for instance, can take a direct quotation as a direct object, while tell can't
- He said "Arma virumque cano" to her
- *He told her "Arma virumque cano"
Though both can take that-clause objects
- He said that he was tired (to everybody)
- He told everybody that he was tired
tell requires a dative-moved indirect object, but doesn't require a direct object at all,
- *He told that he was tired to everybody.
- He told everybody, not just me
while say requires a direct object but not an indirect object, and blocks dative-movement when there is an indirect object
- *He said (to) everybody, not just me
- *He said (to) everybody that he was tired
As for ask, an indirect object is not required
- He asked (the conductor) "When is the train arriving?"
- He asked (the conductor) when the train was arriving
but if one is present, it must appear first, by dative movement
- *He asked "When is the train arriving?" (to) the conductor
- *He asked when the train was arriving (to) the conductor
Part of the problem is that to, the ordinary dative preposition, is not correct with ask, since there are two people involved -- one to ask and one to answer, so there are two directions; to simply provides insufficient directional information.
There are several ways around this.
- One can put a question to someone, about or on some topic
- One can question someone, about or on some topic
- One can ask a question of someone, about some topic.
But mostly ask wants its addressee up front, if it isn't already understood in context.
With no preposition at all.