Yes. Swimming is safe with an ICD once you have fully healed from the implant procedure. Most people are advised to avoid swimming for around four to six weeks after implantation to allow the wound site to heal properly and to reduce the risk of lead dislodgement while the leads are bedding in.
After recovery, there are no specific restrictions on swimming for most ICD patients. If you swim in open water, it is sensible to go with a companion, as it is with any open water swimming.
If your cardiac arrest was caused by an inherited condition such as CPVT or Long QT Syndrome, where exercise or cold water can trigger arrhythmias, discuss specific restrictions with your cardiologist.