From WPA Rule book;
9.6 Safety
The shooter, after the break at anytime may call “safety” which permits him to make contact with the legal object ball without pocketing a ball and end his inning. However, if the shooter pockets the legal object ball the incoming player has the option to play the shot as left, or hand it back to his opponent. (See 9.7 Wrongfully Pocketed Balls which also applies during a safety.)
9.7 Wrongfully Pocketed Balls
If a player misses his intended ball and pocket, and either makes the nominated ball in the wrong pocket or pockets another ball, his inning has finished and the incoming player has the option to take the shot as is, or hand it back to his opponent.