Heres a link to the same question you have that was answered by another. I will cut a small section of response but you will have to click on link to read the full thing.
"Yes Fentanyl or any narcotic can effect our short term memories, regardless of our age. Physicians walk the fine line of memory impairment or pain management. It is my guess you would rather see your mother with some memory disturbances instead of dealing with chronic pain that would make her days and nights absolutely miserable."
"It is impossible to guess if her dementia is drug induced however in my opinion I would be more inclined to suspect she has dementia that is made worse with the fentanyl. So again in my opinion the next question is do you put her through withdrawal to determine her pain level and the effect if any the fentanyl may be having on her memory? You may have hit on the best solution by simply having the Lortabs discontinued, as long as she is still able to maintain the same comfort level. Another consideration would be to trial reduction in the fentanyl dose to determine if her pain would still be controlled and to evaluate any difference in her memory status."