I understand that you are concerned that your fellow Rex vomited brown liquid for 3 days and now refuses to eat and drink at all.
Brown coloring in the vomitus can be from food pigments, or from something that he ate that he should not have. If the vomit looks more like coffee grounds that is more concerning as that can indicate digested blood in his vomit.
In most cases a poor appetite and vomiting is triggered by eating something they should not, too much table food, too many treats or something they find outdoors.
More serious causes of vomiting include viral or bacterial infections, chronic pancreatitis, a dietary allergy or sensitivity, inflammatory bowel disease, internal organ failure (kidney or liver disease), a full or partial gastrointestinal obstruction or even infiltrative cancers such as lymphoma.
Gastrointestinal parasites rarely cause vomiting and decreased appetite in an adult dog, they can lead to loose stools though.
I understand that this may have started because he was fed some ice cream. Because this has persisted for several days though ideally he would see his veterinarian. He is an older fellow and this may be more serious then just eating something that didn't agree with him. If that isn't possible for whatever reason there are some things we can try at home.
To try and settle his stomach you can give either:
1) Pepcid ac (famotidine) at a dose of one 10mg tablet per 20 to 40 pounds of body weight every 12 hours
2) Prilosec (omeprazole) at a dose of one half of a 20mg tablet per 20 to 40 pounds of body weight every 24 hours
These are acid reducers and should help him feel better and hopefully stop the vomiting. They can be given for several days if need be.
I would pick up all food for now and water for a couple hours to allow his stomach to settle after the acid reducers. In a couple hours when you give him water make sure it is in small amounts only. If he drinks too much too quickly that can lead to vomiting. To get some electrolytes in you can also offer him a 50:50 mix of pedialyte and water.
If there is no vomiting in 6 hours offer a bland diet of 1/3 boiled minced white skinless chicken or lean hamburger and 2/3 boiled white rice mixed with some low salt chicken or beef broth to make it easy to lap up and swallow. If he refuses that you can offer a little meat baby food. If he refuses both then don't push it he really does need to see a veterinarian.
But if things go well and he does eat and doesn't vomit feed him the bland diet for 2 to 3 days then slowly start to mix back in his regular food, a little more at each meal. It should take about 5 to 7 days to slowly convert him back to his regular diet.
If he continues to vomit, runs a fever (more than 103F rectally), has a tense painful belly or if he continues to refuse to eat he should see his veterinarian for an examination, diagnostics, injectable anti-nausea drugs intravenous fluids and supportive care.
Please let me know if you have any further questions.