Depends - Your rock is essentially your filter and if you remove it you will upset the nitryfying process it provides.
If you were adding new rock to existing id say its rarely an issue - But id be hesitant to swap your rock out completely as it will cuase a cycle to an extent.
Best options would either be to cycle the new rock seperately before adding into the tank or keep the majority of the old rock for a while too (in a sump is possible). It wont take too long for the bacteria to colonize the new rock anyway.
All of hte above is taking inot account that the new dry rock is suitable though - Some leeches PO4 etc. and requires soaking before use anyway.