There was one permanent official MLB sign on the bulletin board outlining lots of rules. I don’t remember if betting or gambling was mentioned. It probably was.
I would imagine things like that might have been included in comprehensive player contracts that provided exhaustive lists of things players were not allowed to do.
Players would hit the dog track in Phoenix during Spring Training. On charter flights it was common for groups of players to turn the seats around at takeoff and start high stakes poker games. And betting against each other on the golf course was pro forma.
But I never observed anyone betting on outcomes of sporting events except for perhaps a friendly bet on a football game between two college rivals.