In one pocket, fouls like this are illegal, according to
onepocket.org:
6.6 Intentional fouls are an accepted part of One Pocket tactics as long as they are played by use of a legal stroke, such as by lightly touching the cue ball with the cue tip; by rolling the cue ball to a new location without regard for legal contact with either an object ball or a cushion; by pocket scratching the cue ball; or by using a legal jump technique to force the cue ball off the table. However, if the acting official rules that a player has used an illegal technique to direct the cue ball or any object balls to a more desirable location, then the incoming player has the option of either playing the balls where they lie, or requesting the official to restore all such moved balls to their location prior to the illegal maneuver. The offending player is charged the standard one ball foul penalty, and in addition may be further penalized at the discretion of the acting official under the general rules of unsportsmanlike conduct.
I've never seen this come up in 8 or 9 ball, though. If the double-foul is legal, what about just tapping the 9 in with your hand and saying "you got ball in hand"?
Cory