This situation is more complicated than you might realize, hence the answer is more vague than I'd like. But let's analyze the matter at hand:
Objectively speaking your dog actively tries to disrupt anyone giving attention or physical contact to you. You interpreted this as her being jelous, but it could also be:
- that she is possessive of you and tries to defend her possession against others or
- that she's insecure or anxious (you described her as nervous) and your cuddling anyone triggers anxiety in her for whatever reason. She tries to disrupt your cuddling to make the situation return to normal.
- Or some completely different reason that I overlooked now.
You see, it's hard to diagnose this kind of problem without seeing the dog and testing some triggers.
Let me warn you against humanizing her. Jelousy is a very human emotion (and yes, dogs can be jelous as well), but a dog brain works different and she could feel something entirely different than what you interpret. Expecting her to behave like a human results in a closed mindset that might not let you realize her true thought process.
What Could Happen
If you do nothing against her behavior but disengage the affectionate contact due to her yapping, you reinforce her behavior. She wants you to stop hugging. If you stop hugging (even if you scold her) she got what she wanted.
If she's the nervous / anxious type, the worst that can happen is that your hugging someone reinforces her anxiety. If she gets scolded every time you hug, she learns that hugging is followed by scolding, therefore she gets nervous and yappy when she sees you hugging, which prompts you to scold her...
Either way it's a vicious circle of reinforcement.
What Should Happen
I agree that you should train this behavior out of her, but since I cannot diagnose the actual problem, I cannot give you advice on how to do this. There's the risk that you could increase the problem if you misunderstand the cause.
That's why I reccomend you contact a local dog trainer (not the puppy school type, but someone who analyzes the behavior of and trains problematic dogs). They should come to your home and see her actions first hand, then explain the reasons for her behavior to you and advise you trainings to discourage her yapping.
In the meantime I think it would be beneficial for her to experience delayed gratification. That means you teach her to sit and stay on command, even from a distance. Then you introduce short (no more than 2 seconds at the beginning) waiting periods into your play: throw the ball and make her wait 2 seconds before she can run and snatch it. Or put a treat in front of her but make her wait before she can eat it. After training for some time (several weeks at least) you can increase the time she has to wait.
This is not just a neat trick to show off, it teaches her control over her impulses and that she doesn't have to get everything right now now NOW!, but that she can be a little bit calmer and still have fun. For her to learn that, you must always reward her patience (never let her wait only for the treat to be snatched away).