I can’t say for the hypothetical society you described. However, here in America, it was not unknown for a student to marry a teacher after graduation. However, that was before the sexual revolution reached its nadir and both student and teacher populations adopted behavior more appropriate to the monkey house that an American school.
However, upon further study of your post, I must ask whether you considered that the reason the teacher in your post was a virgin because of religious belief or because no female would have anything to do with it? Just wondern’.
;-)
Probably both! Females guarded their “reputation”.