After examining scans and ruling out other possibilities, cancer was the most likely explanation for the unusual symptoms that Rachel Palma experienced beginning in January 2018.

"I was having involuntary movements with my right hand, so I was dropping things," the Middletown, New York, resident said. "The worst symptoms obviously were hallucinations. And I wasn't always oriented to time and place."

Once, Palma locked herself out of her own house and another time, her bank account.

"I was no longer able to process the fact that a key opens the door. The computer screen looked completely different -- it was almost foreign," said the now-42 year old. "What I was perceiving was different and so how I was responding was different -- if someone was asking for a pen, I would give them, for example, a key."

Sometimes she had blissful, symptom-free days. With no warning, the dropping things, the hallucinations, the disorientation would return.

Brain lesion discovered on a scan

After January, her symptoms "progressed pretty quickly," she said, guesstimating she visited the emergency room at least 10 times. "But as soon as they ruled out a brain bleed, I was discharged. Although I was a danger to myself and probably to others, they still discharged me," she said.

Fascinating, mysterious, and medically amazing case files. This series is the most interesting education into the world of medicine and disease and the human body.

She understands why, since no one could identify what was happening with her. "They said, 'If you're not actually having a brain bleed, then it's not actually an emergency,' " she said. A seizure disorder was also investigated and quickly dismissed.

On a brain scan, Palma's primary care physician detected a small lesion in the left frontal lobe of her brain and immediately sent her to Dr. Jonathan Rasouli, chief resident of neurosurgery at Mount Sinai Hospital in New York City, and his colleagues.

"We decided it would probably be in her best interest to do a biopsy of this lesion," said Rasouli based on the fact that she was healthy and young and was having symptoms that he could directly correlate to the location of the lesion. Besides, she had no risk factors for anything else that might explain the presence of a brain lesion. Rasouli carefully explained the possibilities to his patient.

"I was told that it was most likely a malignant tumor which would require radiation and chemo even after the surgery," said Palma.

The surgery would be risky because the location of her "tumor" was very close to the brain region that controls speech.

Rasouli told CNN, "Her fiancé had just proposed to her and they were looking to move in together and then all of a sudden she had this diagnosis of a brain tumor. Can you imagine?"

Palma, though, believed the risk was worth it, "given that it was supposed to be a malignant tumor. I still think the risk was worth it."

Her first operation, essentially a "planning surgery," explained Rasouli, took place on September 10, 2018. A second surgery to remove the suspected tumor followed on September 12.

"We did a small dissection of the brain tissue and what we saw was a very well encapsulated, firm lesion that was ovoid," said Rasouli. "It looked like a quail egg: Same size, same look, same firmness."

A tapeworm was found inside Rachel Palma's brain.

"Wait a second, this is clearly not a brain tumor," he recalled saying at the time.

Asked what a brain tumor looks like, he laughed: "It doesn't look like a quail egg. Most brain tumors are very soft, very mushy, they're not very well defined, they're infiltrative and it's difficult to get completely around them."

Quickly, Rasouli took the extracted lesion away from the surgical field, placed it under a surgical microscope and opened it up.

"And what came out was a baby tapeworm," he said.

How did it get there?

Neurocysticercosis is the medical term for when a baby pork tapeworm makes its way to the brain, said Rasouli. "If you live in the US, it's almost impossible to get this."

The US Centers for Disease Control and Prevention estimates 1,000 new hospitalizations for neurocysticercosis i n the United States each year.

Rasouli said that the tapeworm found in her brain "is not super-duper rare, it's just pretty uncommon."

Cysticercosis is caused when a person swallows eggs found in the feces of someone with an intestinal tapeworm. Tapeworm eggs spread through contaminated food, water or surfaces. People with tapeworms can infect themselves and others with cysticercosis and in some cases the infection will spread to the brain, as happened to Palma.

"There's absolutely no explanation as to how I contracted it," said Palma. She's never traveled outside the country and she doesn't eat raw foods or raw meat, at least not intentionally, she said. How long it had been lodged in her brain is another mystery, she said.

"We're still really scratching our heads about how she developed this," said Rasouli. "If we had any suspicion that she could have been exposed to pork tapeworm or we thought this was potentially a parasite, we ideally would have treated her with antibiotics rather than taking her into surgery."

Today, Palma has no symptoms and is feeling fine. She's thankful to Rasouli and the medical staff at Mount Sinai for saving her life. If the tapeworm hadn't been removed (or destroyed with antibiotics), it could have caused a stroke or even death.

Get CNN Health's weekly newsletter Sign up here to get The Results Are In with Dr. Sanjay Gupta every Tuesday from the CNN Health team.

With all the attention -- "for some reason my story is fascinating to people" -- Palma now has an important message to deliver: "This is not something that is cause for widespread panic. What happened to me is extremely rare -- it's not the norm -- for someone who has not been overseas to contract this."

With a lot of people coming to her for medical advice, she gives the only advice she can: "If you have symptoms that you cannot explain or are concerning to you, then please see a doctor. And see a good doctor.

"Not every headache turns out to be a parasite."