Ms. McBeth told the gathering: “What’s so difficult about me being a teacher? If I was so good before, what’s the difference now? Just because I had a gender change?”

William McBeth was born in 1934, had a successful career selling medical equipment, was married with three children and surfed, skied and hunted ducks.

In a 2006 interview with The Philadelphia Inquirer, Ms. McBeth said her surface masculine identity had long battled with her inner feminine one. Before her sex change, she said, she had taken two suitcases on business trips, one containing William McBeth’s gray flannel suit, striped tie and Cordovan shoes, the other holding Lily McBeth’s dresses, heels and jewelry.

“You prayed for it to go away,” she said of her feminine proclivities. “You invoked every spirit and power you could think of. You threw away and burned all your clothes, and then three months later, you’re right back where you started.”

William McBeth started working as a substitute teacher in several New Jersey districts in the mid-1990s, after his 33-year marriage had ended and he had retired from his sales career. He lived in Little Egg Harbor. At 68, he learned he had serious heart problems and decided to have the sex-reassignment surgery he had long pondered; it cost $35,000.

After he was reinstated, now as a woman, by the Eagleswood board, a neighboring district, Pinelands, where he had also worked, unanimously rehired him as well.

Ms. McBeth told ABC that she would never “under any circumstances” discuss her sexual identity with children in her classrooms. “You simply say, ‘I could discuss that with you another time out of the classroom.’ ”