Mit dem Lehrer esse ich.
Is the sentence "Mit dem Lehrer esse ich." the same as ich esse mit dem Lehrer?
"Ich esse mit dem Lehrer" is the only one that really makes sense and would be actually used in German.
"Mit dem Lehrer esse ich" sounds unfinished, or something from a poem, but not spoken German.
Also, when saying the sentence "mit dem Lehrer ess ich" and putting the emphasis on "ich", it would translate to "It's ME eating with the teacher" (as in, me, and not you this time).