I don't know what the official rules say in this unique situation.
My guess is... adding a foul to the mix doesn't change the whole "option" thing, unless the rulebook specifically says "but if they foul, the option is no longer available."
I think the option should always be there, because you never want a carelessly moved ball to work to the shooter's advantage. The option guarantees he will always be worse off if he brushes a ball, and therefore he shouldn't try to get cute and 'accidentally' nudge it.