As a Roblox developer, it is currently impossible to tell if there is an incoming/outgoing friend request between two users.
There are some existing RobloxScriptSecurity APIs that would be perfect for this. The devhub links on that thread are dead but you can see that the APIs still exist here: GetFriendStatus; FriendStatusChanged
If this was added, I would be able to bring my custom leaderboard closer to feature parity with the built-in leaderboard.