It is legal. What would be illegal is for a public school to promote or inhibit a religion. You can teach all sorts of facts that touch on religion (millennia of Western history) and you can e.g. survey the major religions of the worlds as a cultural phenomenon. You can use circumlocutions or proper names. It's not illegal to confess to having personal beliefs. This is about public schools, which is an arm of the government.
A person who is in a school, for example a student, is not prohibited from promoting or demoting a religion, therefore a student who clearly and openly advocates the Pastafarian faith is not to be sanctioned, except insofar as the conduct is objectively disruptive. This is because the student is clearly not acting as an agent of a government institution. Things are a little murky when it comes to teachers and guest speakers. Teachers do not lose their First Amendment rights when they enter the classroom. Here is a summary of pertinent court rulings. The main principle that comes from such cases is that school districts can direct teachers to refrain from certain actions when there is a reasonable belief that the actions would run afoul of the Establishment Clause. Individual teachers have been ordered to not engage in silent reading of prayers in school (Roberts v. Madigan).
Case law on guest lecturers is probably close to zero, since guest lecturers don't have the same kind of property right to be at the school expressing themselves as teachers do.