"I know him a teacher"
doesn't seem like it can be right to me unless it's casual/conversational and there's some explicit or implied punctuation, like:
"I know him – a teacher" (i.e. "I know him, he's a teacher")
or
"I know him, a teacher?" (i.e. "I know him, is he a teacher?").
As has been suggested, something like:
"I know him as a teacher"
or
"I know him, he's a teacher"
seems more grammatically correct.
There could also be a difference between saying "I know him as a teacher" and "I know that he is a teacher", as the former is more likely to imply a relationship between yourself and the teacher - you are stating that this connection/relationship exists because he is a teacher (perhaps you know because he was your teacher once), whereas the latter could be used to describe someone who you have never even met or communicated with, you're just stating that you know they are a teacher, nothing more. However, this is not strictly the case as you could be talking about someone who is well known in the world for being a singer and actress, which whom you have no personal relationship and still say "I know her as a singer" because that's how you first became aware of the person - because they are a singer.