I'm not sure that a church should be able to discriminate for positions like that (assuming they're paid - more on that below).
If it ends up that the legitimate requirements for a position like Sunday School teacher are so stringent that no non-member is likely to apply, so be it, but simply barring non-members from the position? Why?
If someone knows the doctrine of the religion and is capable of teaching it effectively to kids, why shouldn't they get a chance at the job?
I have a few thoughts about this.
First: sounds like your friend couldn't do the full duties of the job in good conscience. There are other cases where a person can do the job - even if that job is teaching the religion to kids - even if they don't agree with every point in a church's statement of faith or follow every point in their code of conduct.
My grade 10 geography teacher was a young-Earth creationist. I'm sure there was a lot in our physical geography unit that he disagreed with personally; he still taught it effectively. I certainly wouldn't have wanted him - a good teacher - fired just because he didn't accept everything in the curriculum.
Second: I see paid positions differently from volunteer positions. With a paid position, we're talking about someone's livelihood. Messing with someone's livelihood is not a small thing, and I don't think that an employer should be free to mess with it on a whim.
A lot of employment standards laws are in place because of the significant potential for an employer to coerce their employees. That potential largely isn't there with unpaid volunteers.
Also, there's the issue of personal freedom of religion. In other cases, hopefully we can all agree that firing an employee for their religious beliefs would be an infringement of their rights; why should we give churches freedom to infringe on the rights of their employees?
I think my friend's biggest concern was in answering questions from other folks' kids. I think he didn't trust himself enough to not go nuts on the child who prefaced some question with homophobia.
Yes, teachers often have to suck up their personal views. I had to. It's not that hard to avoid certain topics. I find the whole area tricky. Religious institutions most certainly have the right to expect certain behaviors, and have the same rights as private individuals do in terms of not letting people in the door, or expelling a disorderly drunk.
In legalese, so much depends on the word 'reasonable'.