Yes, you can do that. I'm not sure what you mean by "the mesh" - if it is like a sponge I'd replace that too.
If you want to be extra cautious since you don't know the history of the filter, you can soak it in some diluted bleach, rinse well, and then soak it for a few minutes in water with a little extra dechlorinator in it (the dechlorinator will break down any remaining bleach).