Good afternoon and welcome to Just answer!! I am Dr. Loretta, a licensed veterinarian and I am happy to answer your question.
With an obstruction, the vomiting would continue and Rex would not eat. It is most likely a digestive disturbance and this will respond to a fast for 24 hrs to allow his digestive tract to calm down and heal. If eh still has diarrhea, give him Immodium AD at 1 caplet per 30 pounds of his weight every 8 hrs. After the fast , feed the meal of rice and boiled chicken. If he is feeling getter, wean him back to his normal meal.
If Rex continues to vomit during the fast, this could indicate an obstruction and you will need to see your vet right away.
Does that make sense to you?
Good Luck! Sincerely, XXXXX XXXXX