A woman became seriously ill and required open heart surgery after swimming in the sea.