Our dog got into the garbage without our knowing and ate a corn cob whole. One of the ones you get from KFC. Acted like a cork between his stomach and intestines, similar to your dogs troubles. About $1500 later, he was up and around trying to get into the trash again.
They are not too smart sometimes. The food motivated ones are the worst. Years ago I came home to find one of the Dachshunds suddenly looking like a football.
He had found the 1/2 gallon milk jug of Whoppers that someone had left out. They were all gone.