In the theorey of psychology, memory can't be erased.
But I know that it is possible to 'freeze' the memory by hypnosis so that the memory won't be remembered in many situation.
SO, is it possible to cast a magic that 'freeze' the memory which have the same effect as hypnosis?
Hypnosis can cause a "temporary" loss of memory, but that effect does not last. A memory is something that is permanently imprinted in the brain. It is theoretically possible that you might be able to use some sort of self-hypnosis to do this, but even that is unlikely. As to using magic to do it, well I believe that is even more unlikely.