You should not let your dog eat cat litter. They eat it because it is basically digested cat food which dogs love but it's not good for them. Cat food does not contain the proper nutrients that a dog needs and vice versa.
You can put up a baby gate to the door of the room where you keep the kitty's litter box and the cat can jump over it but the dog will not be able to get to the litter box that way. You can also put the box up on a higher surface that the dog can't get to or you can install a small kitty door in the door to the room with the litter box so that only the cat can get through to the box, not the dog. This alternative would depend on the size of the dog. If it's a very small dog, then it wouldn't work because it might be able to go through a kitty door.
You can put up a baby gate to the door of the room where you keep the kitty's litter box and the cat can jump over it but the dog will not be able to get to the litter box that way. You can also put the box up on a higher surface that the dog can't get to or you can install a small kitty door in the door to the room with the litter box so that only the cat can get through to the box, not the dog. This alternative would depend on the size of the dog. If it's a very small dog, then it wouldn't work because it might be able to go through a kitty door.