Mit dem Lehrer esse ich.
Is the sentence "Mit dem Lehrer esse ich." the same as ich esse mit dem Lehrer?
Yes. The meaning is identical, only the emphasis is slightly different. The normal word order is "Ich esse mit dem Lehrer." You would use "Mit dem Lehrer esse ich" if you want to emphasise that you're eating with THE TEACHER (and not with, say, the student).
"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).