If a player's ball is deflected or stopped by an outside agency it is rub of the green and the ball is played where it lies. This rule covers 99% of the rulings where a ball is deflected by an OA. Fellow competitor ball markers are outside agencies/obstructions. (Not Equipment)
The other 1% can get a little complicated. For example:
After a stroke on the putting green and the ball is in motion: If the ball is deflected or stopped by an outside agency that is moving, or if the OA is animate ( i.e. living....doesn't matter if it's moving) the rule is different. In this case the stroke is canceled and the ball MUST be replaced and replayed. Exception: Worms, insects, and the like don't count as moving or animate agencies.