This is the second of a four-part reply. The institution would also have to know that a religious ceremony was an integral part of the event. A public prayer is made such by association with a public institution, nothing else. If an individual prays silently or without asking for an interruption in the proceedings, that would not be a public prayer. That's why I mentioned it.
Someone can offer a public prayer without it being sanctioned.
The second factor is basically not germane. If the public institution doesn't know a prayer is going to be said and an individual simply jumps up and starts praying, it's not a public prayer. It's an individual prayer spoken aloud in a public place. You forget that the public prayer is accompanied by a request for others to participate and that the proceedings are interrupted by the prayer. In the case I made reference to, none of this was the case.