On a factual note, while studying pathology I have come across photos of ovarectomies where the cancerous ovary is dissected to reveal teeth, hair, nail and sometimes brain tissue. Gross but true. Cancerous cells are normally undifferentiated, meaning that they assume the most basic shape and function, but if differentiation is randomly triggered the cell may mature into skin, tooth or any other type of cell in the body regardless of anatomical location. Remember that every single cell in the body contains all the information that describes the individual and may thus differentiate into any tissue depending on its physical location and several other factors.

This condition is specifically referred to as teratoma.