This actual scenario is covered in the rules.
Sec 3.9 Ball on Edge of Pocket
When a ball falls into a pocket without being hit by another ball, and:
(a) Being no part of any stroke in progress, it...