Keep your dog away from those toys if it is doing this. It will definitely affect its digestive system adversely. But if your dog has taken its material in then its better to make it vomit at once so that less chances remain there for internal disorders in the stomach and intestine. Visit a vet immediately if some complication occurs. Change its food as well so that its concentration can be diverted.