It is quite a double edged sword. The priest cannot reveal what he has learned in the confessional, even to the point that if you confessed something to a priest, and afterward the priest thought of something he should have told you, he cannot speak even to you unless you gave him permission to discuss what you had revealed to him in the confessional. Otherwise people would not openly and honestly approach the Sacrament.
If someone overhears the confession of another person, (let’s say the person in the confessional had a very loud voice) anyone else who hears the confession is also bound to the seal.
A priest does have options. If it is someone who comes on a frequent basis and confesses the same sins, with no attempt to change his life, and give up his sin, or the priest is not convinced that they are really sorry for their sins, he is not required to grant absolution, (forgiveness) he should instruct the person that they should review their life and try to overcome thier sins, and return to the confessional at a later date when they have made a good attempt to stop their sinful habit. Or he can grant absolution, but remind the person that the Sacrament is not a “get out of jail free card” that it does not magically forgive sins of persons who are not sorry for their sins and willing to try to amend their lives. Theologians in the Catholic Church use the Greek and Latin Father’s as a guide for what the early Church taught. The Greek Fathers used a term for repentance, metanoia, denotes a change of mind, a reorientation, a fundamental transformation of outlook, of man’s vision of the world and of himself, and a new way of loving others and God.
While a priest could and should tell the rapist or murderer the above, and encourage them to turn themselves in, even possibly offer to go to the police station to ensure the person was not mistreated when they turned themselves in, they could not go to the police in their own, or even reveal the confession to the police when they went with the criminal with out his expressed permission.
Most moral theologians would say that if the police arrested someone who the priest knew was not the rapist or murderer that he could tell the police, I’d continue looking for the criminal, but could not tell them anything else that would pinpoint an individual. He could protect an innocent person wrongly accused, but not tell the police how he came by that information.
Orthodox priests are held to the same standards. The following is from OrthodoxWiki.
The secrecy of the Mystery of Penance is considered an unquestionable rule in the entire Orthodox Church. Theologically, the need to maintain the secrecy of confession comes from the fact that the priest is only a witness before God. One could not expect a sincere and complete confession if the penitent has doubts regarding the practice of confidentiality. Betrayal of the secrecy of confession will lead to canonical punishment of the priest. From the Guidelines for Clergy (Orthodox Church in America)