You could just add a variable $root (or a constant), that will hold the path to the root of your project and simply prefix all the paths with it.
include_rel could look something like this:
$root = '..';
include $root . '/dir/file.ext';
Though the original include is a language construct and not a function so you will need the () around the argument.
$path = str_replace('\\', '/', $path);
if($path == '/' || strpos($path, ':') !== false)
// Path is absolute.
include str_replace('\\', '/', pathinfo(__FILE__, PATHINFO_DIRNAME)) . '/' . $path;
// The str_replace makes it pretty. It could be removed.
// Backsalshes in __FILE__ are given only on windows, which allows both types.