Just to be clear - it was the ball hanging over the lip that caused the timer to start? Instead of standing around and watching, could he have marked his ball and lifted it before it fell in, without penalty? Then replaced it and made the tap in? Or does having it over the lip preclude the marking and lifting?
If the ball had not been hanging over the lip and, while he was walking to mark it, a gust of wind or earth tremor had rolled the ball in I'm guessing no penalty, just remove the ball and replace it? Then mark or putt it?
And then, lastly and a bit off topic - does the mark need to be directly behind the ball? Can it be marked an inch or two behind the ball as long as the ball is returned to the mark?