Not very dangerous, but my source (a veterinarian) tells me that rats do very well on [i] good[/i] quality dog food. Basicaly, if you have to make this kind of a decision, dog food is better for a rat than hamster food.
Before I responded to your question I called a vet who treats pocket pets (rats, gerbils, hamsters, etc) to get a reliable answer for you. So the recommendation to feed dog food rather than hamster food comes from a vet.
I totally understand your concern and the only thing I can suggest is that you call a vet in your area who treats pocket pets and get a specific food recommendation from him or her. (Keep in mind, the phone call is free.) That way you can be sure you will be doing the right thing.
Thanks for your help! I bought an all-natural dog kibble for extra small bread and my rat loves it. I noticed when he was on hamster food for a short while, he was having an overweight problem and lack of energy. He is much better since. I also give him some sort of vegetable a day. Once again, thanks.