Lifting ball to see if cut or cracked
If you reasonably believe that your ball has become cut or cracked during the hole being played, you may lift it to check. First, you must mark the spot of the ball and then lift it without cleaning it (except on the putting green).
If you lift your ball without having this reasonable belief, fail to mark the spot of the ball before lifting it, or clean it when not allowed, you get one penalty stroke.
You may only substitute another ball (by replacing it on the original spot) if it can be clearly seen that your original ball is cut or cracked and this damage happened during the hole you are playing – but not if it is only scratched or scraped or its paint is only damaged or discoloured.