Could a lump on the gums that swells and retreats from time to time be cancer?

It may be an absess. See a dentist because you can get sick from an absess.