How to get rid of rats in wall coming from old washer drain pipe?
Seal the entry hole - where was the washer drainage going, to daylight?  Rats can get into any crack that is larger than their skull size which is smaller than a quarter.  If you are talking about a mouse the hole size is unimaginably small.
Rat snap traps with peanut butter and lots of them.  Expect 50% to spring and not catch the rat.  Be prepared to deal with injured dying rats.
Rat poison in concrete shells to prevent other animals from accessing.  Be prepared for rats to die in your ceiling / walls and smell until they dry out.
Eliminate harborage around your property.  Rats like to move parallel to exterior walls, put the traps along their path.
Eliminate food sources in your yard.


Getting rid of rats is an arms race, so do everything at once.  Don't try #1 and then when that doesn't work add in #2.  Do 1-5 all at once.