He doesn't sound too well to me
Does he appear to have overall malaise? If so, you should try taking him to a vet as soon as possible. It's hard to know what could be wrong, but it sounds to me like it's something internal that may be going on. How old is he? Do you think that he's constipated, or just has a dirty bottom? If he appears constipated, you can offer a few drops of olive oil into his food. Olive oil softens stools and will make it easier to pass. Good luck, hope he feels better soon