I have a child who was just like this. If she got a bigger piece of cake, a longer TV show or whatever, that was fine and dandy. If she even thought someone else got a bigger cookie, or one with more chocolate chips, or anything else, it wasn't "FAIR." Once when I insisted that she apologize, she said, "You always tell me not to lie, but now you're FORCING me to lie because I'm not sorry! Forcing people to lie is WRONG!" (I told her, "Whether you mean it or not is between you and God. Your manners are between you and me.")
She couldn't stand having any limits put on her behavior, but if she was left in charge of younger siblings she ruled with an iron fist. She told me I let the younger kids "get away with everything" by giving them the exact same rules she had, but when they applied to her those same rules were oppressive. It was SO FRUSTRATING for everyone involved. And yes, she was like this with people outside the family, too. She was constantly afraid that someone, somewhere, was getting something she didn't have, whether it was money, toys, privileges or love. She's extremely competetive, and she needs a lot of validation. When you told her she'd done a good job on something, though, she'd say, "No, I didn't!"
I wish I had magic, wonderful strategies for coping with this kind of personality, but all I can tell you is, eventually it gets better! My daughter is an adult now, and we still see glimmers of this kind of thinking, but after years and years and years of us explaining and explaining, and enforcing the rules consistantly, she "got it." She's turning into a delightful adult. Hang in there! This too will pass!