It's easiest to do it with UNION
because it allows you to write 2 independet queries.
select UR.UserRightID
from UserRights UR
where UR.UserID = @UserID
union
select RR.RoleRightID
from RoleRights RR
where exists
(select * from UserRole UR1 where UR1.RoleID = RR.RoleID and UR1.UserID = @UserID)
You can use UNION ALL
of you want to get all records even if they have the same value from both queries.