Yes, people have reported to us that their cat or dog and rats accepted each other and even become good friends!
It usually works best when they are younger so they can grow up together. And it is very important to supervise your pets carefully whenever they are together until you are sure that they are friends. Obviously, a cat or dog can injure or kill a rat, but it is also possible for a rat to inflict a very nasty bite if provoked.
Even if your pets seem to like each other, it is always possible for them to have a bad day and fight, so be careful (that is true with any animals that share the same space, regardless of species)