At its simplest, you need a good scale. A good scale doesn't have to be expensive. I bought a digital postage scale off eBay for something like $7-10 after shipping. It weighs in both ounces and grams, and the weight can be cleared.
Not all rats will hold still long enough to be weighed, so I like the scales that have the TARE (clearing) function. You can put a small carrier cage on the scale, clear its weight, then add rat and get rat's weight. If you don't have a scale with the TARE function you can still do it, you just need to be sure to weigh the carrier, then rat with carrier, subtract the carrier weight to get the rat's weight. Sometimes a small treat works well to get them to hold still.