I chose the "under certain conditions" option. When I read the original question, I thought (for no logical reason) we were talking about elementary school classrooms. When the students are young (say, below 13) I don't think the teachers should be telling them what they believe for fear the students would associate the teacher's stated opinion with a taught fact. I am sure there are many 13 yr old (and younger) individuals who are firmly rooted in their beliefs and this wouldn't phase them, but I am equally sure there are some that are still very impressionable at that age (I have 6 younger siblings....I know of what I speak). In the OP case, I think it detracts from the student's educational experience to inhibit the teacher from saying what they personally believe. I had similar experiences to the OP where I felt like I was being cheated out of a great discussion because the teacher didn't want to get fired. when the students are old enough to think for themselves, how is exposing them to multiple belief systems anything BUT beneficial to their education? Unless the teacher is marking them wrong because they disagree with their opinion, of course (which happened in almost every literature course I ever took and pissed me off every time). When I was a student, I never felt like my opinion was any less valid that my teacher's because I was a student. If we held different viewpoints, I enjoyed debating and discussing with my peers/teachers.
Looking over this post, it appears a bit jumbled. Sorry, guys. To clarify, in a situation where it is a friendly discussion between individuals who are in it strictly for the intellectual stimulation, I think allowing the teacher to express their opinion is a good thing. In a situation where the teacher is using their position of authority to influence the beliefs of the students, it should certainly not be allowed (and any teacher who would deliberately do that really shouldn't be teaching anyways).