Hello, my name is***** and I have over 20 years of experience as a veterinarian. I'm sorry to hear that your pup ate a foam ear plug.
These can be absorbent and may expand a bit in the juices of the gastrointestinal system. It may pass but since she just ate it within the past 2-3 hours, it's worth trying to get her to vomit it back up.
You can give her 1 tablespoon of 3% hydrogen peroxide per 10 pounds of body weight mixed with bread chunks or ice cream (2 &1/2 to 3 tablespoons for a pup her size).
Then take her outside and run her around to get the peroxide bubbling so she vomits.
If no vomiting in 10 minutes repeat the peroxide dose once.
If she vomits and seems to clear her stomach and be done I would check to see if the ear plug pieces are present.
Once she finishes vomiting and empties her stomach to try and settle her stomach today 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 will reduce stomach acid and should help settle her stomach so she doesn't vomit any more.
Then feed a homemade diet of 1/3 boiled, lean hamburger or boiled, white, skinless chicken, all fats and juices drained off the meat, and 2/3 boiled, plain, white rice. Add 2 tablespoons of canned pumpkin, (not pie filling, just pumpkin), to each meal for fiber whether she vomits most of the foreign material back up or not to help push the remaining pieces through.
If you don't have peroxide you can get her to an emergency clinic to induce vomiting.
If she doesn't vomit it back up or you choose not to take her to an emergency clinic still use the bland diet with pumpkin to try and get the pieces to pass.
Once it has been several hours since she ate the ear plug it is likely too late to induce vomiting, the pieces will likely be out of her stomach. All you can do at that point is watch her closely.
If later she starts vomiting, has a tense painful belly or refuses to eat or runs a fever (more than 103F rectally) then that can signify a blockage and she should be seen by a veterinarian immediately. Surgery may be needed at that point.
Please let me know if you have any further questions.