Drop vinegar on the rock, if after a few minutes it starts to foam and bubble then don't use it in the tank as this is an indication that the rock will slowly dissolve in your tank.
Also avoid any rocks that appear to have any veins of metal running through them, limestone, dolomite, shells, coral skeletons and dont use marble .The best rocks to use are granite, shale , lava rock and slate. Also be careful if you are going to boil them because if they have air pockets in them they can explode!