Is it possible to extend Drupal's user_access() function to provide a more complex logic for permissions
Looking at the code there's simply no way to do this without directly hacking the user_access() function. 

There are no hooks invoked and the logic is completely self-contained, aside from one call user_role_permissions(). That function just runs a database query though so there's no scope to intercept the process there.

Obviously you could write your own access function and call it from your own code, but there are 152 calls to user_access() in core files (and countless others in contributed modules) which won't be able to take advantage of it unfortunately.