Does anal swelling and urgency have to be rectal cancer?

Not necessarily.
Patients with rectal cancer may experience anal cramping, which is due to the stimulation of cancerous secretions or the mass pressing the sensory nerve endings that induce bowel movements, resulting in anal cramping, and the patient also has symptoms such as wasting and weakness.
Anal swelling can be caused by many diseases, such as perianal abscess, haemorrhoids, cervical cancer and proctitis, and their accompanying symptoms are also different. Therefore, when anal swelling occurs, it is impossible to determine the cause directly and patients are advised to visit a regular hospital in time to avoid missing the best time for treatment.