How to Tame and Carry a Rat with the Leather Rat Pouch
Getting a Rat
Use a Rat Spawn Egg to place a rat in the world. Approach it and interact to begin taming it. Once tamed, the rat follows you and can be picked up.
Using the Leather Rat Pouch
Craft a Leather Rat Pouch using the crafting_shaped recipe for that item. With a tamed rat nearby, interact using the pouch to store the rat inside it. The pouch lets you carry your rat between locations without it wandering off or taking damage from the trip.
To release the rat, interact again with the pouch while it holds a rat. The rat reappears beside you and resumes following.
Upgrading Your Pouch
Two other pouches exist: the Purpur Rat Pouch and the Twisted Rat Pouch. Each is made through its own crafting_shaped recipe. Craft these when you want a pouch built from a different material, then transfer your rat by releasing it from the old pouch and picking it up with the new one. Keep the Leather Rat Pouch as a spare so you always have somewhere to store a rat when swapping.