With no other context or information, "She can swim" would normally be understood to refer to ability (it seems more likely that someone would be mentioning ability to swim than permission to swim). In certain contexts it could refer to permission; for example, a parent giving their child permission to swim at some event. There is no way to be certain without the full context.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.