Use the old DM standby and give her a custom magic item. Make it work like an improved dimensional anchor, giving immunity against external dimensional effects but still letting the wearer use her own spells or magic abilities.
This effect might not be something you want the PCs get their hands on once the wearer dies. Since the wearer is a marilith, there's an easy solution to that: it's a set of bracers that only works when all six are worn. A humanoid wearing two of them might just get a partial bonus, like +4 on saves vs. dimensional effects, or some such.
Its a raid in DDO but they have Boots of Anchoring which are required, because the fiends may try to banish you back to your own plane during the raid. Boots of Anchoring - DDO wiki
So I would imagine you could have an item enchanted with a constant Dimensional Anchor effect or the like.