If I'm going to hurl underwater and feel it coming (I always feel it), I chuck through my octopus (sorry, buddies). Since I have a sealed Mares first stage, I figure it's more difficult to service and clean the reg. I can attest that after throwing up through the octopus, the next breath (or breath between heaves) is not only fine for breathing, but isn't icky and in some ways is far more pleasant than the first breath when throwing up normally.
I would not take the reg out of your mouth because vomiting, particularly a retching vomit can cause you to gasp in instictively, thus taking in salt water. It also increases your chance of getting salt water in your mouth in general, which I can't speak for others, but makes me feel a lot sicker. In fact, there's been a number of occasions (since if I'm sick, I'm usually sick at the surface), where I've thrown up through my reg on the surface because otherwise I take in salt water, which makes me feel even more miserable.
Just thoroughly clean your reg and/or octo afterwards and possibly get it serviced after the dive trip.
But you truly can do anything through a reg. I have sneezed through them, and just last weekend, learned you can really cough, hack, and choke through them if you're dumb enough to attempt to manually inflate your BC and then take a breath of water rather than a breath of air.