Is it true that you can get a ringworm from dirt?

Ringworn - yes. Ringworm isn't a worm; it's a fungal infection of the skin that results in a red circular rash with darker red around the edge of it, giving the appearance of a worm. So you don't get "a ringworm"; you get ringworm. And yes, if dirt gets under the skin through a cut or scrape, and contains the ringworm fungus, it can cause ringworm. An antifungal cream should clear up most cases.