The full sentence is: "If a gentleman is not serious, he will not be powerful, if he is not learned, he will be loyal and trustworthy. If he has no friends who are inferior to himself, he will not be afraid to correct his mistakes."
It means: If a gentleman does not respect himself, he will not have dignity, and even if he studies, he will not be solid. The most important thing in life is to be honest and trustworthy. Don't make friends with people who don't believe in you. If you make a mistake, don't be afraid to correct it.
Another explanation: "No friend is inferior to oneself" is also explained this way: No friend is inferior to oneself. (You should learn from them humbly)
The difference is: "Friends" is used as a verb "to make friends" or as a noun "friends".