Ripping off a mole is never a good idea, although I do understand that it does happen accidentally, especially if it is a fleshy mole on a stalk.
If a mole is normal, it should not give you cancer if it is accidentally injured. When an injured mole regrows, it can look funny under the microscope, but a pathologist (doctor who examines moles under the microscope) should be told there was trauma to it previously.
If you have the mole that was accidentally ripped off, bring it to your dermatologist and show both the area where the injury occurred and the mole itself. It can still be sent to the lab to be examined.
Now, if a mole is cancerous to begin with, it can get swollen or itchy and bleed. Any bleeding or changing moles should be brought to the attention of the dermatologist immediately.
When a mole is abnormal-looking we worry about it being a skin cancer called melanoma.
Cancerous or abnormal moles follow the ABCDE rule:
Asymmetry: if you look at the mole and mentally divide it in half, one half does not look like the other no matter which way you divide it.
Border irregularity: the border is not smooth, but has notches or indentations in it.
Color irregularity: the mole has several shades of one color or several different colors in it, like brown, black, white, blue, red, etc.
Diameter: it used to be thought that melanomas are larger than 6 mm in diameter or approximately the size of a pencil eraser. But there are melanomas that are found when smaller than that. If the mole has the other characteristics of ABCDE, don't wait until it reaches the size of a pencil eraser. Have it seen immediately.
Evolving: meaning the mole is changing in some way, like the color or shape are changing or it is becoming symptomatic - itching, painful, bleeding, crusting or any other change.
If you are older than 12 years of age, you should have a full body skin examination once a year or more often if you have risk factors for skin cancer. Your moles should be examined and documented - location and size.