Checking access in Views
What you need is to create a custom views access plugin. I found a blog post that contains the basic information about how to do that here: http://techcp.wordpress.com/2011/01/11/adding-custom-access-plugin-to-views-in-drupal/

You then need at least need to do two specific things:

a) Extend it so that the access callback function receives the second url argument as the argument (in function get_access_callback(), change array() to array(1)).

b) In defined access callback function, check if there is a relationship between the currently logged in users and the uid that gets passed in, by using user_relationships_load() (documentation is for D7, but very similar in D6). Something like this (untested):

function your_access_callback($uid_viewed) {
  global $user;
  $params = array('between' =&gt; array($user-&gt;uid, $uid_viewed));
  return (bool) user_relationships_load($params, array('count' =&gt; TRUE));
}


That should already be enough to make it work four your case. However, this sounds like an interesting improvement to UR in general, for this, two additional things would be necessary.

c) Allow to configure which argument is the user id. Maybe there are also other ways where it could come from (if the view is displayed as a block for example). Not sure how to do that.

d) Allow to configure which relationship type should be checked. Expose a form element for that in the options and then pass the chosen relationship type id to your access callback and in there to user_relationships_load().