By definition, an “occupation” is an activity one engages in or is the principal business of one’s life, and the noun “teacher” means one who teaches or whose occupation is to instruct. To say “My occupation is a teacher” is therefore grammatically and semantically wrong. It erroneously makes the activity of teaching equivalent to the person who engages in it. Of course, the alternative statements you suggested, “My occupation is that of a teacher” and “My occupation is teaching,” sound correct, but they are grammatically and semantically correct to a fault.
We must take note here that the first-person statement “My occupation is a teacher” is a typical flawed response to this question: “What is your occupation?” The correct, natural, and straightforward response to that question is, of course, “I’m a teacher” or simply “Teaching.” To say “My occupation is that of a teacher” or “My occupation is teaching” is too agonizingly correct and stilted, and I must say that the English of the teacher who talks that way leaves much to be desired.