Or maybe he doesn't want to hear Beef getting his bone on out in the boathouse.
I don't think Ray thinks that far ahead without prior needling and... I don't think Beef would ever call a man on the fact that he heard the fella wanking. It would be close to almost kinda sorta being slightly gay.
I'm thinking it was Molly who overheard him and called him on it. Only since then has he thought to be paranoid about the subject. Not because he's ashamed but because in his mind, he's afraid it would tempt Molly to go after him and he couldn't do that, not to a buddy from small times.
On the same token, he knows that if Molly came onto him in a time of particular desperation, he would in no way have the force of will to not have sex with her. It is like someone who knows that if they get drunk in the bar, they will hook up with a stranger and don't want to do that...
It's not that they figure out how to control themselves when they're drunk. They don't go to the bar and not drink enough to do that. Their own ability to overcome their instincts, well, they don't believe they could ever do that.
So, instead, they don't go to the bar.
Ray thinks Molly would not resist mounting him if she caught him pulling one out and... Ray realizes he would not resist the mounting either if he was already pulling said one out... and he would never want to hurt Beef like that.
In Ray-Logic, where he thinks all women want him and where he knows he wants all women, the only path out is avoidance. Doing everything he can to obscure when he is playing his one-man band.