The economic arguments for or against a rewrite of a module are mainly the same as the ones for or against the rewrite of a whole system, as they were already presented in the top answer to the question "When is a BIG Rewrite the answer?". In short, this boils down to a cost-benefit analysis, which depends on the specific piece of software and the requirements for changing it - so there is no general answer for this.
Of course, there are some differences to consider when planning a rewrite for a single module:
The risk for rewriting a module which is a smaller part of a larger system is obviously lower than to rewrite the whole system at once. This sounds trivial, but it may be indeed the crucial factor of the decision, especially because the risk of a rewrite failure does usually increase overproportional with the number of code lines involved.
The module must be isolated enough that it actually can be exchanged in isolation, without affecting the other modules. If that's not the case, one may have to plan a refactoring of the surroundings first to bring the module into that state.
An architectural change of the module structure itself isn't easily possible this way, so if that's a goal, one needs a different strategy.
From my own experience, some years ago I was working on a product where we had to replace certain legacy technologies. We came up with a plan to do this module-wise for a lot of modules of the backend of the system, and we actually managed it to rewrite and replace one module after another, bringing it into production before we went to the next module. It took us some years, but it worked well, and finally we replaced the backend completely.
The front-end, however, was not modularized enough and way too much code to rewrite it all at once. We tried it, but after some months, it became apparent we could not manage it with our available resources. So we switched to a different strategy - to port the frontend (which was written in 16 bit C++) to the newer technologies (mainly C++/CLI), instead of rewriting it in C#. That allowed us to reuse most of the code without having to rewrite it.
So yes, rewriting single modules of a system - for example, for a technology switch, can make perfectly sense, especially when it can be used as a strategy to avoid a "big-bang" rewrite.