Tim is correct.
“But” is required. “And” doesn’t work.
I am a teacher, but my friend is not (a teacher).
The other sentence “I am a teacher but not my friend,” is correct but somewhat unnatural because the first clause is fully developed and second clause seems awkwardly abrupt.
Here is a natural example:
- Are you teachers?
- I am, but not my friend.
- I am, but my friend isn’t.