Yes you do need to know how to swim. Even if life jackets are mandatory in most of snorkeling tours, you need to be able to swim to follow your guide.