My hamster could care less about the rats XD. But i had the rats before i got my hamster, i can even touch the rats and then her, and she doesn't care. But as if your hamster will get use to your rats, i think so, it will just take time. But maybe try to block the rats from climbing all over the hamsters cage? I think even my hamster would get nervous if i allowed my rats to do that.
Good luck!