For some reason, cat stool is particularly attractive to dogs. Whether in secrecy or plain view, your dog may have performed a litter box raid. Prevention is the best medicine: a baby gate works well in most cases to restrict access to the room containing the litter box. If you are the owner of a chewing
puppy, a non-plastic gate may be preferred. Other methods include installing a hook-and-eye mechanism or cord on the door and propping it just wide enough so the cat may come and go freely.
For more information on why dogs behave this way, please read the article
Coprophagia.