Believe it or not, the dog could have hemorrhoids, just like a person can. Unfortunately, it could also be any number of other things that could be more serious, so I would get the poor dog to a vet as soon as possible. This could be an emergency and waiting could be fatal.