How to avoid breaking the rule that almost cost Jon Rahm

Jon Rahm's golf ball