No. "From" means that something would be originating at the teacher and proceeding outward. (It was exceptionally difficult to say that without using the word "from"! ;) )
"To" means starting somewhere else and finishing at the teacher.
"Ask your question *to* a teacher" would be correct.