I feel for your friend! How hard this is to have your child going through this! I agree with the other responder that she is too young to clean up her own vomit. I did wonder about why she ultimately gets to sleep in mommy and daddy's bed though? I think there may be some other ways to handle the issue other than totally giving in and allowing her to sleep with her parents. I also don't think a 2 year old can make themselves sick "on purpose". However, it is not outside the realm of possibility that she is getting herself so wound up that she in turn throws up. It sounds like there are two extremes here (clean up her own "waste" or sleep in parents bed). Does she sleep in her own bed/crib during nap times? Is she extra clingy otherwise? I would encourage her to try to find a happy medium to begin addressing the issue. Your friend may want to try some of the following: a special night light, bedtime toy, blanket to help comfort her. Checking on her when she is crying, briefly comforting her, and then putting her back to bed. Use these items for naps as well, and encourage her to have a "lovie" that she uses when she is upset to soothe herself. I feel most children will adopt quickly to the cry it out method (if used within reason), but this is the first I've heard of a child getting so upset they throw up.
If she has been sleeping with her parents when she is upset, it will take some re-structuring (and this can be awful for parents) to get her happily back into her own bed. The hardest thing to do is to have to "un-do" bad sleep habits- however, with perserverance, it can be done! Best of luck to your friend.