A bunch of friends are using public-key encryption to send encrypted messages to each other using an open public forum. I.e. each friend has a public key (which you can use to encrypt messages for them) and a private key (which they use to decrypt messages for them).
Bob sends Alice the encrypted message $y$, which, when decrypted, yields the text $x=$"I'm going to murder you unless you send me \$1000". Alice, obviously angry, sends everyone the unencrypted message "Bob is a bad person. He said $x$ to me, which you can all verify by encrypting it with my public key to produce $y$, which he previously posted on our public forum." This is a full-proof method for Mary to expose Bob's message to everyone.
My question is, are there any public-key/asymmetric encryption schemes that would stop Mary from exposing Bob's encrypted message to everyone? For example, a scheme where the only way Mary could prove what Bob's decrypted message is would be to reveal her secret key (the password she uses to decrypt).
Edit: One idea I have is for an encryption scheme to allow for some kind of nonce, or secure randomization of what the message gets encrypted to. For example, if $x$ is the text Bob wants to encrypt, he can choose a random "nonce" $s$, and produce $y_s$. Then Mary can decrypt $y_s$ to get $x$, but she won't know $s$, so she can't just say that $x$ produces $y_s$ unless she reveals her secret key. I know this nonce concept exists in cryptography, but if anyone could give me an explicit example of how to implement it (perhaps with something simple like RSA), that would be hugely appreciated.