The only way to figure that out is testing. Motion detection uses the live viewport (the same thing you'd see in the LCD screen, roughly). In general, motion detection suffers in dark conditions, because the more you crank up the ISO the more noise there is, and noise looks just like motion. Motion detection should be fine detecting a light being blocked out or moved against a dark background, but the limits will have to be determined by experiment. As long as your light is significantly above the noise floor, it should be OK.
You should be able to set up a decent test without actually taking it on a dive. Use the same luminosity lure in a dark room at the same distance and test different motion detection settings.
Most of the A series will probably fit the "slightly smaller than G9" requirement. The SX200 might be another option.
This advice of testing applies to anything you plan to use CHDK for. Unless someone happens to have used the same camera in very similar circumstances, the only way you are going to get a reliable answer is controlled testing. If you are serious about using CHDK, you are going to have to need hands on experience with the scripting system anyway, so the sooner you start trying to actually do things with it (even if they are very simple low fidelity tests) the better off you will be. Remember that CHDK is a hack. Most behavior is not well specified, and the only way to really know how something will work is to try to do it.
fbonomi mentioned covering up the flash. I'm pretty sure that some flashes can be damaged by doing this, but I may be wrong.