The law in Canada - and I suspect other common law countries - is that there is no general legal obligation to rescue someone. To quote from a legal textbook "The law leaves the remedy to a person's conscience".
However, if a person attempts a rescue, he is regarded as "entering voluntarily into a relation of responsibility, and hence assuming a duty". He must use reasonable care in dealing with the victim and would be liable if he abandoned the person in a position of danger.
If you want to read about a botched marine rescue and what the Court had to say, go here:
CanLII - 1970 CanLII 34 (ON C.A.)