Discern Location can find a person or an object. It gives an exact location, including which plane it's on.
Per
Discern Location "To find an object, you must have touched it at least once."
That solves that problem (for the lich, anyway).
That solves the problem of finding out where it is, and whether that dimension exists. And Find the Path tells you how to get there.
per
Find the Path: "The location must be on the same plane as you are at the time of casting."
That solves that problem (for the lich, anyway).
It will even tell you the password needed to bypass magical protections, such as Alarms, Glyphs and/or Forbiddence spells.
Lucky for the Lich,
Symbol of Death (from which all other symbols inherit) doesn't actually require a password, and gives you the option of special conditions:
SRD said:
You can also set special triggering limitations of your own. These can be as simple or elaborate as you desire. Special conditions for triggering a symbol of death can be based on a creature’s name, identity, or alignment, but otherwise must be based on observable actions or qualities. Intangibles such as level, class, Hit Dice, and hit points don’t qualify.
(
Emphasis added)
So if you suddenly appear in an area guarded by one that triggers for everyone except the lich, well.... sorry.
Likewise, with the
Glyph of Warding, the password is just "Typically" used. The spell also says:
SRD said:
Alternatively or in addition to a password trigger, glyphs can be set according to physical characteristics (such as height or weight) or creature type, subtype, or kind. Glyphs can also be set with respect to good, evil, law, or chaos, or to pass those of your religion.
So unless you're an undead Lawful-Evil lich of a particular height who worships Vechna, you might have a problem with that one of the Lich doesn't feel the need to be typical.
And with
Forbiddance, the password is "At your option". It doesn't have to be there. As long as the Lich doesn't change alignment after casting the spell, he doesn't need to include one in this area he'd much prefer only he can be.
The Lich might well protect himself from such detection, but protecting such an inanimate object might be more or a problem.
Not really. The best way to stop indestructible lich shenanigans is to make a house rule that requires the lich visit the phylactery periodically. Something along the lines of 'must physically touch the phylactery at least once per day, or take lethal damage at the rates described in the starvation rules, which cannot be healed by any means until the lich does get to his phylactery' or some such.
Then the lich will always keep his phylactery reasonably nearby. It won't be beyond impassible barriers, it won't be held by a mook subjected to Imprisonment, it won't be overly difficult for the lich to reach when he's low on spells, and so on. It may very well still be warded to high heaven (or is that deep abyss?), but it'll always be reachable.