The cementing material on sandstones is generally one of 3 things: quartz, calcite, or alumino/ferrosilicates. The latter 2 will mess up your aquarium.
It's easy to tell if your sandstone is calcite cemented or is composed of detrital calcite grains...it will fizz in dilute acid. If you don't have HCL or Muriatic acid, you can use vinegar. If it fizzes, forget it.
Argillaceous sandstones are cemented with clay minerals and oxides. They are fairly uncommon. Most of the time it will look like the individual clasts are surrounded by mud. It's generally not that competent and not something you'd want in a tank of water anyways. Most would actually be fine in your tank, but it's hard to tell what minerals are in the cementing material...so it's best to avoid them.
Good sandstones are made of quartz clasts and are also cemented with quartz. They are inert. They are great. I use them all the time.