Here are some thoughts for your friend to consider:
Human nature being what it is, there is a strong tendency toward perversity. That means whenever we're told we must do something, we often dig in our heels and decide that nobody is going to force us to do it. Conversely, when we're told we can't do something, that inner rebel says, "Just try and stop me."
It could be that the more she resists the visits, the more determined the father and the gf will become to show up.
It doesn't sound like your friend has any legal standing to keep these visits from taking place. All she can do is start thinking creatively.
If he is the legal father (and it would appear that placing his name on the birth certificate makes him so), she not only can't refuse him access now, she needs to know that he has the right to become involved long term. It's in her best interest (AND the baby's), to do the very difficult task of setting aside her "new mom of a vulnerable child" emotions so she can take a look at her options.
One good possibility is that this man will step up and truly shoulder his responsibility in a way that is respectful, reasonable, and willing to place the baby's needs first. If he can bring himself to do that, working with him may complicate your friend's life more than she would choose at this point, but his presence could be a good thing overall.
Another good option is that if he isn't going to behave in healthy ways over the long haul, that the novelty of the tiny NICU baby will soon wear off and he'll book (taking gf with him) when he realizes how much the baby's care will ask of him.
Your friend can turn the current tension-filled situation around by dropping the tug-of-war rope and coming up with the exact opposite of the "normal" response. Instead of resisting the FOB's visits, she can arrange to meet him at the NICU or some other neutral place so they can communicate. Have him bring the gf along, by all means.
Then she can lay out a plan to include him/them in the baby's care, not only while the baby is in the NICU, but down the road. She can talk about CPR classes and apnea monitors and any other special care needs the baby might have and ask him/them when it would be convenient to learn about these extras. She can also speak of some of the risks involved and mention the emotional turmoil she goes through at times.
If this guy has potential (his track record seems to indicate otherwise), he might balk initially, but he'll still want to be involved. If he's basically self-serving and he's conciously or unconciously using his baby to appeal to the gf (Must Love NICU Babies), they'll probably both start backing off, making excuses, and skipping agreed upon appointments or visits.
I'm guessing there's a strong novelty factor in play right now. The baby might seem more like a cute puppy (awwwww) until they are introduced to the world of heavy-duty responsibility and what that might require of them.
If your friend seeks to welcome and embrace rather than resist and reject, first off, she'll have the advantage of surprise. Then she can begin to use the perversity principle to her advantage. The more she wants the FOB and his gf to take a hike, the more she should strive to include them.
Maybe they'll surprise her and step up in ways she could not have imagined. That may not be her ideal scenario, but it could have some important benefits for her and the baby in the long term (not the least of which is a lack of animosity).
More likely, the curiosity and the entertainment aspect will wear off and the care and feeding of a NICU baby will seem more daunting and less fun.
Taking the contest and conquest out of the situation means there is nothing to score, nothing to prove, nothing to win.
The gf could be an unwitting ally in all of this. She might not have any desire to hook up with a man who a.) is heavily involved with a fragile child (and the mother who is part of the deal), or b.) is such a cad that he refuses to be there for his own flesh and blood. Then, too, she might make their continued relationship contingent on the FOB backing away and having only minimal involvement.
It might seem like I'm saying your friend has to put her child on the line to scope out what's happening with the father. In a way, that's true, but the baby is in the safety of a highly controlled environment with many people witnessing every interaction. Your friend can use this supervision and scrutiny to her advantage--she can call the father out and see what kind of man he really is with many others observing. Her positive efforts can also count greatly in her favor if and when there are hearings and court dates (she should keep a diary).
Since your friend can't stop the visits, it seems like her only choice is to use them to her advantage.
I wish her well.