Yes, one can have sex even if one has asthma. If asthma is affecting one's sexual life, it means that the asthma is not well controlled and one needs to consult a doctor.
Related Questions
How can I make sure that my child doesn't have an asthma attack in school?