Passers-by on Weymouth Beach helped a stranded dolphin swim back out to sea after it beached itself on the shore.