Yes, not all rules are the same. In fact, there is an entire book dedicated only to the differences between high school, college and professional baseball. It is a thick book.
Let’s take a look at this play in particular. Professional rules state a ball is dead if it lodges in a catcher’s or umpire’s mask. The catcher is the only player listed in the rules. With no reference to a ball lodging in a glove of anyone besides the catcher, the implication is the above play is legal. The batter runner is out. College rules would judge this play the same.
That leaves only high school rules. To make the umpire’s life difficult, this play is considered illegal in high school. Rule 5-1-1(f)(5) says a ball is dead anytime a ball lodges in player’s equipment. Notice the rules says player’s and not just catcher’s.
The penalty is 2 bases from the time of the pitch (also see case play 5.1.1 R). If you find yourself on a high school field and this happens, kill the ball and give the batter 2nd base. You should also be prepared to talk to the defensive coach.
In order to know the rules, you have to know all the rules in all codes.
This play is covered on page 61 of RuleGraphics.