Scrub it off while the rock is out of the water for a few seconds: it will help, and it won't hurt your corals if you're fast and careful not to hit them. I don't say it will utterly get rid of it. Move all of your water that you can get out clean. The sand is iffier, but wash it in the last of the tank water, and get it out as clean as reasonably possible. You're going to need some bins to store things until you can get the sand down first. If you use all new sand you're apt to get a small cycle, which is hard on things. You should replace the last and dirtiest water with new salt water, like a 30% water change. And watch your temperature.
Fish caught in the middle of this process should be carefully managed and acclimated to the new tank. Ziplocks can help, but don't seal them long. This whole process is going to have to go like deliberate, well-planned lightning if fish are involved.
Be well organized, plan, think things through about sequence, and have extra hands who are willing to take orders.
Test your ph and chemistry when you're done to be sure you're ok. And before you add any fish back in. PH can vary when water is poured, aerated, moved, or overturned with sand. Have enough ro/di and salt AND buckets to handle any eventuality. Watch ph, watch temperature, and test again every few hours to be sure it's all going smoothly.