The Rules of Golf says:
"If the ball lies in a hazard, the player must not touch or move any loose impediment lying in or touching the same hazard – see Rule 13-4c."
Here is rule 13-4:
13-4. Ball in Hazard; Prohibited Actions
Except as provided in the Rules, before making a stroke at a ball that is in a hazard (whether a bunker or a water hazard) or that, having been lifted from a hazard, may be dropped or placed in the hazard, the player must not: