Sure. In water damage situations we run into, say, where the carpet+underpadding has been flooded and there is still need to replace for example a particleboard subfloor, then we normally replace the subfloor+underpadding once the carpet has been thoroughly cleaned. If this were an insurance-covered job, the insurance company would pay for new underpadding and carpet cleaning and - most times - the subfloor replacement. Sometimes new carpeting but either way, and unless this was a black water situation, the carpet can be reused.
However, and again if it's an insurance job, and depending on the situation, the carpet may be replaced on new tackstrips by using a power stretcher - not just a knee-kicker. If not an insurance job, a knee-kicker would do, but the results are better and longer-lasting with a power stretcher; that's why the insurance companies require them. There is a certain method to replace carpet with stretchers and it takes a knack - but do-able.