In the context of cancer, sclerotherapy is primarily used to treat vascular malformations that can complicate tumors or to manage symptoms caused by these abnormal blood vessels. For example, it can be used to treat venous malformations associated with certain cancers, reducing pain and improving the quality of life for patients.