The sentence, "He is a teacher, and her?" isn't grammatical. It contains the fragment, "and her?" In writing, the idea would be better expressed, "He is a teacher. And what about her?" In this example, "her" is the object. In spoken speech, parts of sentences are often omitted but the brain retains the grammar of the complete sentence. This happens often in sentences that point at people or continue action that was started in a previous sentence.
Take, for example, this exchange, which is quite normal;
The volunteer looked around the crowd. "Who do we give the extra money to?"
"Him," a woman said, pointing to an injured soldier.
In this exchange, the woman leaves out the idea "We should give the money to..." but speaks the rest of the sentence "him."
So coming back to your example and filling in some of the empty sections, this is how the exchange makes better sense:
The inspector looked at the line of people, then turned to the school principal. He pointed at a man at the end of the line and said "He is a teacher," but then pointed at the woman next to her and asked "And her? (Is she a teacher also?)"
"Her?" the school principal responded, nervously. "She is also a teacher."
I can't prove it, but I would guess (and experience with other questions on Stackexchange indicates this) that many situations of "incorrect" pronouns being used are the result of confusion, or different ideas about what parts of dialog are being omitted, and also to the idea of "pointing," which gets transferred to spoken language.