If you want to take someone sailing on a boat and you ask them if they can swim, what exactly are you asking? Everyone can float if they have a life jacket right?
My understanding is that someone is being asked if they can take care of themselves and/or tread water until they are rescued and/or if they are a strong swimmer, but I could be wrong.
IMO: If they know how to handle themselves on a boat and what to do if they go overboard or an emergency occurs; gauge their level of knowledge and experience.
Being firm that safety is your number one priority when sailing and following up with direct questions to test them if they know the basics and they take them seriously.