Is there anything one can do to save the deceased from the consequences of their Kamma? I generally had the understanding that there is no way one can save the deceased from the consequences of their Kamma. At most, we can send Metta to the deceased which may comfort them wherever they exist. This understanding of mine is based on this story, wherein the Buddha using the analogy of butter and stones in two earthen pots makes the son of a deceased father understand that one cannot help the deceased escape from their Kamma by performing rites and rituals.

But I was surprised to come across the Ullambana Sutra  in another answer in this forum, where the Budhha seems to suggest the contrary - recommending rites and rituals for the benefit of the deceased and in fact their liberation from woeful states.

Can anyone clarify this contradiction and elaborate on how one can help the deceased? Is Metta for the deceased effective for their well being?

P.S. My question is not to create controversy. I'm more interested in learning the right view than the contradiction, if that helps anyone answer. I would be glad even if anyone answered the question without touching upon the contradiction part.
I like to make the following points (from a Theravada standpoint.):


Sañcetanika Sutta and Loṇa,phala Sutta deals with how Karma can be eradicated or results can be limited.


If you have done a large amount of +ve Karma then a litter -ve Karma has limited effect
Your Karma ceases to exist when you experience the result. This is something you want to avoid if it is a bad Karma but when doing Vipassana your old stock of fabrication come into the surface and gives you a sensation and passes away if you are equanimous to the experience. These experiences tend to be more milder than Karma giving results in the normal course. See: The Discourse Summaries

Rights and rituals have a place in Buddhism:


This is to keep the institution going and as means to attract people to Buddhism especially who are not yet ready or mature for deep insight
Rights and rituals can be a steppingstone to liberation if the rights and rituals foster morality (sīla,vata), as in (Ekā,dasaka) Cetanā’karaṇīya Sutta
Rites and rituals cannot eradicate Karma at least as per Theravada tradition