One witness told Spanish media "I could hear how they were telling her "you have tested positive for coronavirus and you have to leave the water".
The woman refused to wear a face mask which led to a police officer putting his baton in the air, said the witness.
The witness also claimed she continued to swim in a different area instead of heading to the shore.
San Sebastian mayor Eneko has said the woman's actions were "irresponsible".
It is thought the woman is a lifeguard at a local beach during the summer, and that a colleague of hers alerted police.
She is expected to be hit with a €6000 or more fine for breaching quarantine rules.
If another person is infected because of her actions she could face a fine of over €110,000.
Coronavirus cases in Europe have begun to rise dramatically.
Spain has hit the half a million mark earlier this week.
The country has recorded 525,549 confirmed cases of Covid-19, and 29,516 related deaths, since its first case was diagnosed on January 31.
The rise in the European country has sparked fears that other countries within Europe could be next, including France and the United Kingdom.
In the UK, some areas are facing tougher restrictions in a dramatic rise in cases.
Earlier in the week cases rose by 2988, which was the largest rise since late May.
France has also seen a rise in confirmed cases, after 7071 new cases earlier this week.