I've seen the "I have a black friend" excuse, just as I've seen the "Do you have any black friends" or "Do you even know any black people" and the "Oh, he lives in an area that is 95% white, so his opinion doesn't count" type responses. These kinds of responses are usually just as bad (and sometimes what prompts the "I have a black friend" response in the first place).
There is 'associates', 'friends' and 'best friends'. The OP refers to the two extremes: 'associates' (people you may know by name, but don't really hang out with, except maybe a rare drink together) and 'best friends' (people you are very close with). Associates you don't invite to your wedding, you do invite your friends, and the 'best friends' are the groomsmen (or bridesmaids) in your wedding.
No, I don't have any black best friends or black friends, so I would not be somebody's 'white' friend*. But that's more down to opportunity than racism. And I don't make friends easily, regardless of their skin color.
*Though there may be some of my wife's family in China who thinks of me as their white friend, relative or whatever (though they would probably say "American" instead of white, most chinese would think of white people when they hear 'American'.)
I car-pooled with a black man, briefly, until he got a job with the railroad. There was three of us, so he would say I was "One of the white guys I carpool with", though I really doubt he would word it like that. One black co-worker helped hook me up with another co-worker, which turned out to be a terrible relationship, but that wasn't his fault, none of us knew what she was really like outside of work (pill-popper). I've been in a black bar (owner is black, 90% of the customers is black, any white people in there is more often than not a female), so at that bar I might have been "The white guy". But these were all 10-20 years ago.