oh you dont have to use the active selection list. you can have as many selection lists as you wish, and none of them have to be active.
MSelectionList mslActive = MSelectionList::getActiveSelectionList();
MSelectionList::setActiveSelectionList(mslActive);
MSelectionList mslSomeNode; <-- this selection list is empty
mslSomeNode.select("name"); <-- this does not alter the active selection list;
mslSomeNode.getDagPath(0, dagPath); <-- now dagpath is the path to the dag node
mslSomeNode.getDepNode(0, moObject); <-- now moObject is the MObject for the dependency node
MSelectionList::setActiveSelectionList(mslSomeNode); <-- NOW we have changed the objects which are selected in the viewport, but of course you don't have to do that if you don't want to