Any ball means ONE single ball. It could be the cue ball, it could be the object ball, or it could be a ball that was struck by the cue ball or object ball ( or struck by a ball struck by the cue ball or object ball, etc, etc).
It simply means a ball has to hit a rail after the contact between the cueball and the object ball. This way you cannot just tap the cue ball into the object ball softly, and try to play a safetey, etc.
Another note, you can't hit the cue off a rail first and count it. A ball must contact the rail AFTER the collision of the two balls.
Hope it helps.