Can a swollen gland under armpit maybe be caused by cancer or ra?

Possible....yes. Any abnormal lymph mode needs to checked out by md... Cancer, RA among other more simple possibilities like infection are also possible.
Yes. Are you sure it is a gland? It may be a cyst. Most swelling in the armpit that are painful and red are related to the sweat gland. These often come and go over time. Lesions related to cancer will tend to be not painful and will enlarge and may be associated with lumps in other regions. Ra nodules tend to be firm and not painful as well. Typically on pressure points.
Need to see your MD. Any time presence of enlarged lymph node require a visit to your physician for evaluation, in a female a mammography and other tests are required for diagnosis.