The first thing you need to understand is that you don't have any control over another person. If she wants to leave, she's going to leave and you can't stop her. You can tell her how you feel about what she's doing, but the rest is up to her.
So focus away from what you should do in order to influence her actions, and just tell her how you feel. Tell her that you are afraid that her close friend has influenced her current wish to not be committed to anyone and that you are afraid that she is going to realize what she's lost when it's too late. Then tell her that you don't want her to come back to you after she's left.
I think you should clarify why you don't want her back (Because you fear that you will have moved on and it will be too late? Because you will feel humiliated to take her back?) When you are clear on why you wouldn't want her back, then you will be able to convey your position to her. After you have clearly stated where you are coming from, there is nothing else for you to do except one thing: make sure that her taking a hike is not an indirect way of expressing anger toward you.
If she is angry with you for something you did or didn't do, then you have a chance to repair matters. When a person is happy in a relationship and feels that his/her needs are being met, he/she doesn't feel the urge to escape. Of course there are exceptions to what I just said. If, for example, the person is a masochist and can't tolerate being happy, or if he/she is afraid of committment, then he/she might exit a good relationship.
If she is leaving because she can't allow herself happiness or is scared of committment, then putting that issue on the table is the first step to resolving it. If she hasn't had enough life experiences under her belt, then she may need to play the field in order to convince herself that your relationship is truly the best she will ever find. Only time and experience will tell her this, and, yes, she may lose you in the process.You can ask her how she thinks she'll feel if and when she finds out that you were, in fact, the best guy for her and that you are no longer available when she returns to you.
I have given you every avenue to follow, and if you follow my plan and she still decides to exit, you can at least rest easy knowing that you have done all you can do. Let me know how you make out.