There are different methods for removing the smell of milk, depending on the type of carpet. If the carpet fiber is synthetic, then detergents can be used, and wetting the carpet will not be an issue.
In this case, it is advisable to rinse the area thoroughly and then to apply pressure with a clean white cloth in order to remove excess water. Light detergents or baking powder can be added to the water if necessary. For natural fiber carpets such as wool carpets, the area should be cleaned by applying pressure with a damp cloth. As little water as possible should be used and it is best to avoid rubbing the fibers.