Putting rocks in a microwave oven is a bad idea. Baking rocks may also be a bad idea, but less likely will cause as much damage as microwaving it. Boiling them is ok.
Carbonate rocks from the beach such as limestone or dolomitic rocks will be okay and contribute to the hardness of your tank water.
Stay away from rocks that have shiny veins or anything which could be ore minerals. Such rocks can contain substantial ammount of heavy metals such as lead, copper, cadmium, which can be toxic when dissolving.