PostgreSQL How to get friend requests in table by seeing if there is a duplicate of the reverse of a column?
You can use EXCEPT to remove the complementing rows.

SELECT friend1,friend2 FROM friends 
    WHERE friend1=2 or friend2=2
EXCEPT
SELECT friend2,friend1 FROM friends
    WHERE friend1=2 or friend2=2;


But maybe using a CTE will perform better.

WITH buddies 
AS ( SELECT friend1,friend2 FROM friends 
        WHERE friend1=2 or friend2=2 )
SELECT friend1,friend2 FROM buddies
EXCEPT
SELECT friend2,friend1 FROM buddies


Unfolding the or into a union may help performance too.

WITH buddies 
AS ( SELECT friend1,friend2 FROM friends 
        WHERE friend1=2
     UNION ALL
     SELECT friend1,friend2 FROM friends 
        WHERE friend2=2
   )
SELECT friend1,friend2 FROM buddies
EXCEPT
SELECT friend2,friend1 FROM buddies