Surprisingly, yet, many rats can use a litter box as their toilet.
Of course, rats don’t have the same instinctive urge to bury their waste like cats.
But rats will often choose a specific area in their cage to poo and, sometimes, pee. And, if you put a “litter box” at that spot, the rat will then use the litter box. After a while, the rat may become conditioned to use the litter box wherever it happens to be.
Some of our rats are even more clever, in that they have figured out all on their own that they need to poo inside of a litter box filled with cat litter. My wife suggested that they would, and insisted that we keep a litter box on the sofa when we play with them. I admit I was skeptical at first, but here is a video which proves she was right: Butter making poo in a litter box all on her own
I want to point out that I didn’t try to “train” Butter in any way: I just provided the option, and she did it on her own. Several of my other rats will use the litter box and, when the other rats see them do it (or smell the results), they will, too. So, the litter box method works for us, and it might work for you, too.
Give it a try and let me know what happens!