Yes, they will use it for poop - but if they have diarrhea they might not be able to make it to the box!
Of course, the best thing is to figure out what's causing the diarrhea, which I'm sure you are working on. Half an Immodium usually works for ours if it's a temporary stomach upset from eating something they shouldn't…
Terry