Water seepage in basement
Cement and mortar are not inherently water proof.  Water penetration into the basement is probably not the cause of eroded mortar but instead indicative of a more serious problem stemming from the outside.

A complete fix will involve digging up the area outside the foundation, applying proper water proofing, installing weeping tile (or replacing) and drainage, then replacing the soil.

You will probably find that this is not a DIY job.