I apparently don't understand what you mean by not being able to modify the load path, since your executing
use lib '../'; which is modifying
@INC.
Why don't you just do
use lib '../';
use ModX;
and be done with it?
Update: After re-reading the original post, it seems you are trying to perform magic within ./ModX.pm to replace itself with ../ModX.pm. Any particular reason you don't just replace it then?