Two people have drowned and a third person has been taken to hospital after they were caught in a dangerous current at a beach in Western Australia.