In fact, this kind of showing-off is more a sign of love and respect. Your child trusts you so much that he or she dares to use you to make a point to the friend. That's not too bad. I can pass on another warning. Whenever friends get together, children try to play one family off against the other.
Every parent has to learn one very important lesson.
You have to use your judgment. When you are in charge, and when the children are in your house, what you believe in has to be what goes. I don't mean that you should sound rough and tough and angry. You can learn from what the children say. And you are wise to change your mind sometimes because of a point the youngsters make.