Blackrazor wins ... probably
Ring
If you die while wearing the ring, your soul enters it
Blackrazor
If this necrotic damage reduces you to 0 hit points, Blackrazor devours your soul.
Since being reduced to 0 hit points doesn't usually kill you, then Blackrazor would devour your soul.
PHB, p. 197:
When you drop to 0 hit points, you either die outright or fall Unconscious, as explained in the following sections.
Massive damage can kill you instantly. When damage reduces you to 0 hit points and there is damage remaining, you die if the remaining damage equals or exceeds your hit point maximum.
If damage reduces you to 0 hit points and fails to kill you, you fall Unconscious.
Instant Death
It is unlikely, but technically possible that the necrotic damage from Blackrazor could instantly kill a character. I can think of a few conditions that might make this more likely:
- Low level character might have fewer than 10 maximum hit points
- A character might gain a vulnerability to necrotic damage
- A character may have had his/her hit point maximum reduced by life draining attacks from a wraith or other source
In any case, the key part of the rules regarding dropping to 0 hit points is:
When damage reduces you to 0 hit points and there is damage remaining, you die if...
So, do you drop to 0 hit points, and then die? Does Blackrazor swallow your soul?
Your DM will have to resolve this question. To the best of my knowledge, this is not explicitly outlined in the rules, nor has it been officially answered.
For guidance, your DM might consider this answer found on page 13 or the Sage Advice compendium:
If the damage from disintegrate reduces a half-orc to
0 hit points, can Relentless Endurance prevent the orc
from turning to ash?
If disintegrate reduces you to 0 hit
points, you’re killed outright, as you turn to dust. If you’re a
half-orc, Relentless Endurance can’t save you.
The Relentless Endurance racial feature, PHB p. 41:
When you are reduced to 0 hit points but not killed outright, you can drop to 1 hit point instead.
It is possible that this Sage Advice ruling indicates that even though Relentless Endurance would put you back to 1 HP, the effect of Disintegrate, triggered by being reduced to 0 hit points, is still resolved.
That would imply that, when a character is reduced to 0 hit points, you resolve all of the effects that would happen as a result. In our case, one of those is instant death, and one is from Blackrazor. After resolving both conditions, the character is dead, and his/her soul has been swallowed by Blackrazor.
The effect of the ring cannot not be resolved until after the character is dead. At that point Blackrazor has already swallowed his/her soul.
But in the absence of explicit rules or an official answer, the decision ultimately rests with the DM.
The soul can be free, but you need to find the body.
Almost all Spells that return a creature to life require a body(or part of a body). There is only one that specifically states it works without: true resurrection:
The spell can even provide a new body if the original no longer exists, in which case you must speak the creature's name.
Assuming you know the creature's name, then you can begin.
Out of the ring
The next step is getting the soul out of the ring.
This one is pretty easy, as the ring states:
You can remain in the ring or depart for the afterlife.
This suggests that the soul is free to leave the ring whenever it wants to. As there is no language that states it is trapped, then we just have the requirements of true resurrection, which does require the soul to be free and willing.
As the soul is free to leave, there really isn't a restriction keeping it in the ring if it's willing to be resurrected.
The soul can either depart the ring prior to casting true resurrection, or it can leave as part of true resurrection. There isn't any rules-issue with when it departs, but more in that it can depart and that it does so willingly.
Best Answer
The description of the past events and objects in the cabin suggest that the Ring is overwhelmed by Cabin's power.
The description of the events happened in the cabin says
Considering that
and that the Ring of Mind Shielding is an uncommon magic item, hence second to last regarding "power level" of magic items:
we can conclude that the description strongly suggests that the soul/spirit\$^1\$ of PCs are trapped by the cabin.
As a DM, you can obviously rule otherwise.
Since the above reasoning is based on a free interpretation of the description of the events happened in the cabin and on "power level ordering" of magic items, as DM one can decide that the ring's power overcomes the cabin curse, above all if you are worried about superseding player agency by just saying "your ring does not work".
In this case, I provide a couple of possible rulings.
Suppose that all the PCs die in the cabin, but the Ring bearer\$^2\$ does not suffer from the cabin's curse and their soul is trapped in the ring. After sometimes (hours or days, up to DM) a NPC enters in the cabin, finds all the PC's bodies and wear the Ring of Mind Shielding: the PC soul trapped in the Ring can communicate with the NPC and maybe they can involve this person in solving the cabin quest:
If you do not want to involve any NPC, since the PC soul can leave the ring at any time, they can decide to leave because they can not do nothing: you could hence rule that once the soul has left the ring, instead of reaching the realms of afterlife, it is trapped in the cabin, together with the rest of the party.
Finally, as suggested in Molot's answer you still may give the player a choice.
\$^1\$ Let's assume that spirit and soul have the same game meaning.
\$^2\$ Frodo, is it you?