It may be or it might all pass through him fine.
If this was a fiber fill type product the big danger is that the fibers may cause an intestinal blockage. If that happens you would be likely to see vomiting, diarrhea, or an inability to pass stool. The dog also often stops eating.
You may find some cat hairball remedy will help him pass it through or that some fiber will work to help him move the material through his system.
You can give him some oatmeal, or some plain canned pumpkin, or some bran flakes, mixed in some dog food, or some metamucil at a dose of 1 teaspoon per 55 pounds of dog.
If he only ate a little bit then you can just watch for any signs of problems and see a vet or wait for it to show in the stool.
Foam rubber type fillings should pass through if the chunks were not too big. Foam rubber can end up stuck in the stomach because it swells up with stomach acids.
You may end up needing vet help to get the foreign material out of your dog.
Normally items pass through in about 24 hours so keep an eye on his stool.
You can read more here about the items dogs swallow
Hope this helps you!