There is another option overlooked, of detecting the cat inside the litter box. If the box is tall enough, that is the place you could potentially put an ultrasonic sensor, by having it inside looking down, but due to ringing issues these have a minimum detection distance which you may or may not be able to achieve. Such a method would definitely point to software interpretation - you need software range-gating to ignore the floor of mounded litter, and see the cat as a closer reflection; then you probably also need to entirely ignore the situation for a bit after triggering the cleaning mechanism, so you don't re-trigger off that. As mentioned in comments, the response of the cat to an ultrasonic system should be evaluated before committing to such a path. At the cost of higher power, identifying a cat inside the litter box (or at least a "blob") should also be well within the capability of computer vision algorithms watching a webcam given suitable IR illumination.