When Thor was calling for his hammer and ready to strike the back of the Accursed One, it deflected the hammer with a back fist. From reading stack posts regarding hammer, it should have not happen. "Thor's Hammer enchantment cannot be lifted, moved by anyone except Thor or Someone worthy".
Mjolnir's "cannot be lifted" property (which does not include "cannot be moved") only applies when it is dropped or set aside. (Thor volume 1) Adamantium has also proven to be impervious to a strike from Mjolnir, proving that it can be blocked, as well as trading blows with other weapons made from uru, the metal from which Mjolnir is crafted.
Mjolnir has also been damaged on several occasions, from being sliced in twain to being completely vaporized (by interrupting the bonds between its atoms).
Finally, enchantments on Mjolnir have been removed in the past. Specifically, it used to be able to be used for time travel, but that enchantment was removed by Immortus (with Thor's permission).
For the specific encounter you're referring to, I'll note again that Mjolnir's property "cannot be lifted" does not prevent it from being moved or deflected, and is only active when set down (or dropped), not swung or thrown.
I was just watching the movie and I just thought of a way it could be easily deflected. Think of how the "Accursed" get there power. From the Aether. And what is the Aether? An infinity stone but more importantly the reality stone, which can alter the reality of things around the user. So it could be presumed the power given from the aether altered the effects of the hammer on him. Either that or you can just say it's power from an infinity stone which predates his hammer by a long shot and no matter how powerful the hammer is the stones are more powerful. Well at least in the scope of how hard he threw his hammer at the accursed which I think is far from the full strength the hammer could give.
Above is true for the comics. But we're talking about the Cinematic Universe here. And in Thor: Ragnarok when Thor returns to Asgard and Loki is disguised as Odin. Thor states:
"you know that nothing will stop Mjolnir as it returns to my hand. Not even your face."
In my opinion, for the Cinematic Universe, it should not have been possible.