I can't think of any way to feed your hedgehogs that would not be available to the rats. If the hedgehog can reach the food then so can the rats.
But you do have a trail camera 😉, so put the feed out for the hogs and a couple of nights a week monitor it with the camera, if rats are spotted you have to stop feeding - and do whatever you have to do with Mr ratty.