Yes, certain medications can be used as preventive measures. For instance, oral contraceptives not only prevent pregnancy but also reduce the risk of ovarian and endometrial cancers. Hormonal treatments can also be used to manage symptoms of menopause and prevent osteoporosis, which is common in postmenopausal women.