Can I have sex?

Oh, you went there.   Yes. An ICD is to help you live, not limit you. The average person's heart rate during sex is similar to the same amount of effort it takes your heart to climb a flight of stairs. So yes, you can, and should, still have sex.