I am under the impression that folding when you are not facing a bet is against the rules or at least is extremely bad etiquette. But, the only reference that I can find to folding when not facing a bet is specific to seven-card stud.
In Seven-Card Stud [According to Robert's Rules of Poker], you will continue to receive cards even after you "fold" until there is a bet that actually makes your fold valid. This is probably related to the fact that the specific cards each person will receive would be different if that person had checked.
Since that implies that the fold itself was not "illegal," I suspect I am wrong about folding out of turn never being acceptable. Do we really want to discourage people from giving up whatever tiny percentage of
equity they might have had?
That said, I do know it
was explicitly against the house rules at a private game I used to play in. Any player who attempted to fold when not facing a bet was told they had to wait for a bet to be made first. Then their cards were returned to them (if they had pushed their cards forward).
Most of the time, this didn't mean anything. I can think of one time where it was 5-handed and a guy tried to fold the flop. The flop was K-Q-Jr, or something like that. The guy held 6-5o. I have no idea why he was in the hand in the first place. Those games were insanely soft. I digress. His hand was returned to him. It checked all the way to the river, where he hit a 5. Turns out, a pair of 5s was good. He took the pot down. It caused quite an argument because a bunch of players were trying to argue that he had "folded." The house repeated that you can't fold if you could check instead. It was "The Rules."