The story originated from an article (archived here) where it was published by TheHeartySoul.com on August 17, 2018 under the title "New Study: Many case of 'dementia' are actually side effects of prescription drugs". It opened:
Studies: Common Prescription Drugs Linked to Increased Dementia RiskWe wish it wasn't the case but, unfortunately, memory loss is a hot topic. People have countless questions about brain diseases such as Alzheimer's and dementia. What really causes it? Will there ever be a cure? Are there any natural preventatives? How do my other medications that I'm taking affect my risk of such problems?
In fact, many prescriptions have actually been linked to memory loss! We hope to answer these questions and more below. So, if you or a loved one is worried about or currently living with this problem, please keep reading...
This is what social media users saw:
The misleading article starts with a generally accurate explanation of dementia and also a description of the statistical findings of the 2015 study:
In March 2015, researchers published a prospective cohort study in JAMA Internal Medicine called "Cumulative Use of Strong Anticholinergics and Incident Dementia." The University of Washington and Seattle healthcare system, Group Health, conducted the long-term study which tracked 3,434 men and women who were aged 65 and up, and had no dementia when the study began. 
The team accessed every participant's history of drug use for the previous decade, including both over-the-counter and prescription drugs. Over a 7-year timeline, they followed up with all the participants every two years, during which 797 participants developed dementia (637 of whom developed Alzheimer's disease).
As researchers looked back on what those 797 individuals took, anticholinergic drugs became the main suspect. The most common anticholinergics participants used were tricyclic antidepressants, first-generation antihistamines, and bladder antimuscarinics. Compared to those who didn't take anticholinergic drugs, people who did for as little as three years were 54% more likely to develop dementia.
Before diving into why this story is misleading, let's first answer the question "What are anticholinergic drugs?":
Anticholinergic and antispasmodic drugs include a broad class of medications that are used to treat various medical conditions that involve contraction and relaxation of muscles. Examples of these conditions include overactive bladder, muscle spasms, breathing problems, diarrhea, gastrointestinal cramps, movement disorders, and others. Anticholinergics work by blocking the action of acetylcholine in the brain and at nerves. Neurotransmitters are chemicals made and released by nerves that travel to nearby nerves or, in the case of acetylcholine, nearby muscles and glands where they attach to receptors on the surface of the nerve, muscle, or glandular cells. The attachment of the neurotransmitter can stimulate or inhibit the activity of the receptor-containing cells. Anticholinergic drugs affect the function of many organs by preventing acetylcholine from binding to its receptors.
A list of specific drugs in the category can be found in this article titled What are examples of prescription anticholinergic and antispasmodic agents available in the US?
The conclusion of the study titled "Cumulative use of strong anticholinergics and incident dementia: a prospective cohort study" offers important advice to physicians and their older patients about how to minimize the "potential association" of the longterm use of the drugs and the development of dementia:
An increased risk for dementia was seen in people with higher use of anticholinergics. Our findings suggest that a person taking an anticholinergic, such as oxybutynin chloride, 5 mg/d, or doxepin hydrochloride, 10 mg/d, for more than 3 years would have a greater risk for dementia. Prescribers should be aware of this potential association when considering anticholinergics for their older patients and should consider alternatives when possible. For conditions with no therapeutic alternatives, prescribers should use the lowest effective dose and discontinue therapy if ineffective. These findings also have public health implications for the education of older adults about potential safety risks because some anticholinergics are available as over-the-counter products. Given the devastating consequences of dementia, informing older adults about this potentially modifiable risk would allow them to choose alternative products and collaborate with their health care professionals to minimize overall anticholinergic use. Additional studies are needed to confirm these findings and to understand the underlying mechanisms.
The conclusion made it clear that the "underlying mechanisms" are not understood. Dr. David S. Knopman, a neurology professor at the Mayo Clinic in Rochester, Minnesota, emphasized this in the medical publication "Neurology Today" in an article titled "Anticholinergics Found to Be Associated with Risk of Dementia, Study Suggests":
Dr. Knopman said that it was "highly unlikely" that the drugs themselves were the direct cause of the dementia, adding that the ultimate underpinnings of the article have a strong biologic basis.
Anticholinergic drugs "affect the area of the brain that facilitates learning and memory, and that's the basis of the cholinergic model of Alzheimer's," he said. "That pharmacologic profile probably has negligible impact on people under 60, but with people with incipient dementia, the drug probably exacerbates the symptoms."
Dr. Knopman said the main limitation with a prospective study is an indication bias. He suggested that the use of these drugs might be because of incipient dementia, rather than the drugs themselves causing the dementia. But he added that the researchers did split off those taking antidepressants, and they still found the same associations with the anticholinergic drugs.
Nowhere in this study does it conclude that dementia cases are "actually side effects" of prescription drugs.
For a better explanation of dementia, its causes, symptoms, and treatments, visit this Mayo Clinic webpage.
NewsGuard, a company that uses trained journalist to rank the reliability of websites, describes theheartysoul.com as:
A "holistic health" site that has published unsubstantiated health claims and medical advice. The site includes regular contributions from controversial "alternative medicine" and anti-vaccination advocate Joseph Mercola.
According to NewsGuard the site does not maintain basic standards of accuracy and accountability. Read their full assessment here.