This is soooomewhat addressed in the novels. In one of them, Cortana infiltrates a Combine space station and begins to utterly devour the information there. She very rapidly finds herself overwhelmed with the amount of data. Rampancy, as explained in the books, is due to AIs acquiring so much data that they begin to overthink everything which ends up driving then insane. I'm simplifying things for the answer, but they more or less think themselves to death. Cortana notes that she is being overwhelmed with data and knows the dangers inherent in that. She finds a Combine program that allows her to rapidly stamp out inferior copies of herself. The first few are more or less used as data backpacks to take home. Others are sent out along the space station to cause mischief and help the Spartans.
I think I remember her being terrified in the Halo novel that takes place during the first game, because being in the Halo system, she was accumulating such enormous stores of data at such a terrifying pace that it was like drinking from a firehouse- and there was nowhere and no real way to dump the data. As a result, she was really, truly desperate by the time Master Chief finally returned with 343 Guilty Spark.
So yes, if an AI is willing and capable of dumping memories and extra data, they should be able to restore themselves back to normalcy. But the opportunities to do so are limited and the AIs themselves rarely have enough presence of mind to do such; remember that Cortana is very different from other AIs. While other AIs are programmed for teaching, tactics, or running ships, Cortana is designed for covert ops. As such, she is able to pretty much tap into and run any system, and has a consequential increased capability and self awareness that other AIs lack. Simplified: she is smarter than other AIs and can recognize dangers to her own emotional and intellectual stability better than them. This is also why she is able to function far, far past the usual 10 year death-by-rampancy typical of AIs.
However, even Cortana knows that it is a losing battle- too many memories become integrated into her personality gestalt and can not be removed. As such there is a definite functional lifetime, even with her. Dumping memories stops being effective when they are integrated into your gestalt- you begin to try to save your mind from insanity by cutting off parts of your own brain.
So to sum up: yes it is possible, up to a point, but rarely occurs.