Once the carpet is completely dry you can either replace the padding yourself of
have a local carpet store come out and replace the padding for you and reinstall the rug. If you've done a good job of drying the rug, it should be fine and you can use it normally. It might be a good idea to get it professionally cleaned after it has had a chance to settle back into place for a few weeks just to remove any deep-set dirt from the water damage.