Of course you can and should use your rock, absolutely. Transferring the rock will insta-cycle the tank, so you can transfer your livestock at the same time and they will be fine.
Sand is a bit more tricky, now you've months worth of fish poop and uneaten food, so stirring that up and transferring it to the new tank will create ammonia spike, so its important to clean the sand before transferring it. Put it in a bucket and run tap water into it, swish is around and empty out the dirty water, and just keep going until the water starts to run clear. It takes several hours but its important or you will start your new tank in a bad note. So rinse it or buy new sand.
Some use the old water, I guess its fine, personally I like to just use new water.
its really that easy, build the tank, get the sand in, fill it with water, and then transfer the rocks over, then the livestock, and your done. Match the temp and salinity very carefully, thats very important since its like a 100% water change.