It is generally not recommended to walk rats on a leash. Rats are small, fragile, excellent escape artists, and can become stressed or aggressive in unfamiliar environments. They can easily slip out of harnesses or be injured if they pull.
Safer alternatives include free play in a secure area, interactive toys, or carrying your rat in a carrier. If you do use a leash, use a well-fitting harness and keep the rat in a safe, controlled environment.