This :
friend bool operator== (MyClass &lhs, MyClass &rhs);
is a function, which compares two objects.
This :
bool MyClass::operator== (MyClass &rhs);
is a member function.
You should use the one proposed by your coding standard, or use the one you prefer. None is better. Some people (including myself) prefer to have the comparison operator as a function, other prefer it as a member function.
By the way, the parameters should be of const MyClass & type.