There was a case of a guy, where they botched the anesthesia, and he was just paralyzed but conscious the whole time during some invasive surgery. They realized their mistake, and tried to fix it by giving him some amnesic so he wouldn’t retain the memories.
After getting discharged, he wouldn’t remember anything… but kept having nightmares, and a few weeks later took his own life.
So it seems like memories don’t need to be fully formed to mess one up.