The safety of having sex during cancer treatment depends on the type of cancer and treatment, as well as the patient's overall health. Patients should consult their healthcare provider to understand any specific risks or precautions. For instance, some treatments may temporarily lower immunity, making patients more susceptible to infections, which could be transmitted through sexual activity.