If during a hole you decide the ball is unfit for play you have to signal your intention to your opponent in match play, or marker/fellow competitor in stroke play and mark the position of the ball. You also have to give your opponent/marker etc the opportunity to also examine the ball, lifting and replacement under Rule 5-3