There are many rules in Rules of Golf that allow for some “wiggle room”. Rule 18 – Ball At Rest Moved is one of those rules.
Here is a little breakdown of that rule and how to proceed under this rule when it applies.
If a ball at rest is moved by an outside agency, there is no penalty and the ball must be replaced. However, in order to apply this rule it must “be known or virtually certain” that an outside agency has moved the ball. If not, you must deem the ball lost and proceed under Rule 27 for a lost ball.
Except as permitted by the Rules, when a player’s ball is in play, if a player, his partner or either of their caddies – lifts or moves the ball, touches it purposely (except with a club in the act of addressing the ball), or causes the ball to move, or the equipment of the player or his partner causes the ball to move, the player incurs a penalty of one stroke.
If the ball is moved, it must be replaced, unless the movement of the ball occurs after the player has begun the stroke or the backward movement of the club for the stroke and the stroke is made.
Under the Rules there is no penalty if a player accidentally causes his ball to move in the following circumstances:
If a player’s ball in play moves after he has addressed it (other than as a result of a stroke), the player is deemed to have moved the ball and incurs a penalty of one stroke. The ball must be replaced, unless the movement of the ball occurs after the player has begun the stroke or the backward movement of the club for the stroke and the stroke is made.
The most common situation we see on TV is Rule 18 – 5: Ball Another Ball. If a ball in play and at rest is moved by another ball in motion after a stroke, the moved ball must be replaced.
For the complete reading of the Rule, I suggest you checkout the USGA’s Online Rules of Golf.