My experience is that, more often than not, the patient knows, or has a pretty darn good idea of what's going on.
When it's not a cultural issue, I've often seen a daughter or son, who was mommy's or daddy's little prince or princess (and has not managed to become anyone else's prince or princess) who can't face what's manifestly happening.
Witholding information does indeed cheat the dying person of the opportunity to close their life out as they wish.
One case I had: A man came in directly from a hospital to the IPU where I worked. A couple family members were in complete denial, insisting on IV heart meds, fluids, etc, because the cardiologists were all wrong. We got him settled, cleaned up, and comfortable.
When his family came in, the patient turned to me--he'd known me for about 20 minutes--and asked if he told me his last wishes, would I see they were carried out. I told him I would do everything I could to make sure they were.
There was really nothing special about me. He just used me to get the message across to those family members who wouldn't face facts. That's desperation, eh? Even then, one of the deniers said "That's just his sense of humor."
Fortunately, other family members prevailed, he got to belatedly tell his loved ones what he wanted, and died peacefully three days later.