What kind of pills or treatment can somebody get for rectal swelling?

Evaluation. If the swelling is due to infection and no abscess is present antibiotics are appropriate, hoiwever if there is an abscess or fistula, surgery is the treatment of choice. If in doubt see a colorectal surgeon.
Rectal swelling. There really are no pills for rectal swelling. The exception might be when the swelling is due to infection (uncommon) and the treatment is antibiotics. The most common cause of rectal swelling is hemorrhoids, which can be self-treated with hot baths and otc ointments (not particularly effective). Most important is to see a doctor and determine the specific cause of the swelling in your case.