Galatians 2:9
9And when James, Cephas, and John, who seemed to be pillars, perceived the grace that was given unto me, they gave to me and Barnabas the right hands of fellowship; that we should go unto the heathen, and they unto the circumcision.
There was relationship, and at least at this time an ear to hear.
13And the other Jews dissembled likewise with him; insomuch that Barnabas also was carried away with their dissimulation.
But Peter was leading others astray, so deserved to be rebuked. So much that even Barnabas was being led astray!
however, anyone that is leading others astray needs a rebuke from any where! not sure if relationship matters at this point. It just may not be heard, from an "outside" source.
however, Proverbs 27:6
6Faithful are the wounds of a friend; but the kisses of an enemy are deceitful.
Better from a friend, than anyone else!