Not all sandstone will erode or breakdown. You just want to make sure there is no calcium in the rock, you can test it with Vinegar to see if it fizzes, that's the vinegar reacting with the calcium carbonate.
But if you don't know exactly where it came from, don't use it, not worth it. If you do want to try, just do the bucket method where you soak it for two weeks or more and check all the parameters.
Here's a quote about sandstone:
"Sandstones can vary greatly in their chemical composition.
This is due to the fact that the sand is cemented together by various minerals which have been formed in the pore spaces in the rock. The most common “cements” are calcite, iron or quartz. Sandstones, on the whole, are inert in water, although the cement type will dictate their strength and mineral composition.
The most important factor to consider when utilising these rocks is their porosity and often fragile nature. Sandstones bonded with iron will remain stronger over time than those containing calcite: the latter tending to crumble after a period of submersion.
The high porosity of sandstones leads to the containment and release of toxins/chemicals acquired from an aquatic environment. You need to be sure of their source."
http://www.sydneycichlid.com/aquarium-rocks.htm