Not what you want to hear - but water damage to electronics and the sort of relatively unprotected optics in a compact camera usually puts them beyond economic repair. It's worth checking if you've got any insurance cover - possibly via your household insurance.
Quite what is happening is very hard to guess at - it's possible that there's a power drop happening when the flash capacitor is trying to charge due to corrosion somewhere (battery contacts, perhaps).
If you ask a service centre to look at it, they'll probably charge you to say it's beyond economic repair. You could phone a service centre for their opinion, but I don't think it's going to be positive, sadly.
However, it could just be that there's not enough light for the camera to focus. I just checked with an Ixus 700 (SD500) here - and at distances of more than about six feet, the AF assist light doesn't throw sufficient illumination to focus.
If that's the problem, though, I found I could still take the picture (albeit that it was out of focus).
I'd try the camera with the flash on in daylight to eliminate the possibility of it being a low light issue.