Probably, imo. You might just be taking with a peer/ co-worker about your teacher that you, used 설함 instead of 이름 to show the proper respect due to him/her (even if you don't know their name, lol).
Would 선생님의 be correct if it was used in this sentence? In addition, could «I do not know the name of my teacher» be a valid translation? It was not accepted, so I am wondering if, in that translation, a subtle part of the original sentence's meaning was lost.
Shouldn't this be 저는 제 선생님의 성함을 몰라요? I was marked wrong on another question for not including 의.