If it is wall-to-wall, even enzymes will not remove enough of a significant smell to make a huge difference, cleaned in place-- it won't get down and into the pad. You wouldn't want it to-- it will rot the pad if left in too long, as well as damage and good flooring under it.
BUT if you have a local carpet-cleaner who does roomsize rugs at their place, you CAN pull up the rug (de-install it), send that out for enzyme-cleaning front and back (double cost), and have an installer re-lay and re-stretch it back where it came from, over new padding. They may even throw in the re-install if you buy the padding from them and set it up this way in the initial estimate negotiations.
That enzyme stuff WORKS, if it has time to work and enough water, and a good person using it who knows what they are doing. A question to ask the cleaner is, will they be hanging the rug to dry, because if not the water for the enzymes will sit in the rug longer. That's good for smell removal, but it may also encourage rug rot and mold growth unless they really know their business.
===
Another alternative renters often use (or the landlord does) is a hardwood or faux hardwood border (bamboo for green) around the perimeter of the area. You put a bound, padded, roomsized rug over it to let the wood peek out and appear to be whole-floor. THese can be gotten cheap at used-carpet shops (they carpet conventions and then take the carpet back out afterward). They usually have a binder (or know who does binding locally).
You can get really good quality rugs that way for about a third of the going rate at a dept. store, AND you get an always-easily-cleaned rug that you can take with you, going forward.