The problem is that the devil has an insatiable appetite and has come to collect the soul of a graduate student as a down payment. Julie is in a no-win situation. One could say that she is at fault for not finding out about the arrangement with ABC before she started work with ABC's support, but that would be unfair. No graduate student would know to ask such questions when first starting out. The courageous thing for Julie to do would be to sign the agreement, finish the research and get her degree.
Publication can wait.
If the negotiations with Joni do not result in a mutually agreeable paper, then Julie need not publish anything at all. She can leave the data to be used by Dr. Angstrom's laboratory and go off to find a position elsewhere. Alternatively, she can take the data with her and publish a paper later, away from the clutches of ABC and Joni. But that, as I stated, is the courageous thing to do. There is no good and simple solution here, and all alternatives are difficult.