In SA OC Siman 340 in the Taz Sif-Katan 1 and brought in M"B Sif-Katan 10 that one shouldn't remove wax from on top of an ois (letter) in a Sefer because of the issur of "erasing" (mechika). The Biur Halacha there in Siman 340 Sif 3 discusses the issue of m'sakain maneh since through taking off the wax makes the Sefer Torah kosher for reading (at least more licatchila even though it says in the M"B if this is found during the kriah one should read further and not take out a new Sefer Torah).
Although I don't see any difference between wax and dirt, I still would like to ask: if dirt would be found on a Sefer Torah and could only be removed by using one's fingernail, would this still be an issur of mechika (other issues of chok tochos aside)? of m'sakain maneh? What about in a case where one doesn't have to use a fingernail to remove the dirt?
And if dirt is somehow different and would be muter, perhaps there would be a problem of muktzeh? (Or even if it's ossur this would seemingly also be a problem but it doesn't seem that the poskim mention this.)