As far as I understand, you have to desensitise your pup to the act of you giving attention to other dogs. It's a bit tricky to do out in public with other people's dogs though. The only way would be to teach her a solid sit and stay, have her do that while you pet another dog, and reward her for waiting in place.
Lots of dogs do what your puppy is doing, and it's often without issue.
But in the case of my own dog, it became a very big problem. He lived with another dog previously (with his original owner), and jealousy turned into guarding. He would lunge and snarl at his owner's existing dog any time she went to pet him (or any other dog). She rehomed him to me because of this.
I have trained him to sit and stay while I pet my cats in front of him, and he's doing very well with that. So it can be taught, but it's just a bit trickier if you don't have another pet at home. And it's always trickier outside, where there's a lot more going on, compared to indoors in a controlled environment.
If in doubt, do speak to a trainer/behaviourist if you can afford it. They could also bring along a dog so that you can train her on this more effectively. It's just easier to prevent a possible issue than try to reverse a big issue.