Many dogs eat grass and subsequently vomit. Others do not vomit after eating grass. It may be they vomit due to grass not being digestible by a dog's system, or due to the grass causing a gag reflex.
Many dogs do seem to do this on purpose as a way of emptying their stomachs though some claim they like the taste. I've seen my pre-labor females eat grass just prior to labor, which I've always assumed was their way of relieving nausea and to clear out their stomach.
You never want to let a dog eat grass that has been treated with fertilizer, weed killers or pesticides or where mushrooms might be. Since grass is not digestible for a dog, if your dog was to eat a large quantity, it could possibly cause a blockage. To curb this behavior, keep your grass well mowed, as they tend to like the longer grass.
Now as to the underlying issue. I believe it is likely to be due to excess bile. Excess bile can cause stomach upset and your dog might be eating the grass in an attempt to vomit up the excess bile. A yellowish vomit indicates an excess of bile. There are several things you can do to help with this type of situation. You can give your dog some pepcid or Zantac. Read about Pepcid dosages and usage information here: http://www.petplace.com/drug-library/famotidine-pepcid/page1.aspx
Zantac can be given to a dog at .25 to 1mg per pound every 8-12 hours. Read about usage here:
I'd start feeding your dog smaller meals 3-4 times a day taking up the food bowl afterwards. This way your dog will have food in its belly on a regular basis throughout the day. This will cut down on excess bile. I'd also add a spoonful of plain yogurt to your dog’s food 2-3 times a week to add good bacteria to your dog’s stomach to aid in digestion as well. The bland diet of boiled chicken and rice can be used for a few days. If your dog does fine, you can slowly reintroduce your dog’s regular food into the chicken and rice mixture until it is all regular food.
If these things do not work for your dog, then your dog will need to go to the vet and have tests run to determine if a more serious condition is present.
Hope these suggestions help.