Since, as you describe it only the crank is turning when you hear the noise, the only place it could be is within the bottom bracket bearing and/or the seals. If dirt and sand only got as far as the seals, you're fine for now, but it'll migrate farther and get into your bearings and cause excess wear soon enough. If it's already in the bearings, you want to get them serviced before riding much more.
Either way it sounds like you need the BB serviced soon if not immediately. You can have a shop do the job, or can look up tutorials specific to your type of bottom bracket and do it yourself. If you act now there's a good chance that no parts will be needed, just some cleaning and regreasing.
__________________
FB
Chain-L site
An ounce of diagnosis is worth a pound of cure.
Just because I'm tired of arguing, doesn't mean you're right.
“One accurate measurement is worth a thousand expert opinions” - Adm Grace Murray Hopper - USN
WARNING, I'm from New York. Thin skinned people should maintain safe distance.