I've actually used PVC fittings in some of my tubs before to act as chew toys and hides, and to my surprise the rats can't chew through the Schedule 40 PVC piping much at all.

And obviously you would fill the dispenser once it gets low. You shouldn't let any hopper/dispenser empty out for any amount of time and then decide to refill it. So the rats escaping is not a worry.