PO4, yes.
NO3, no.
Sand I would not re-use BTW.....forgot to mention that. The critters in it won't live and it's hard to clean.....and new sand is cheap
The rock I would really try to keep.
Neither PO4 nor NO3 should be a problem under normal circumstances in a new tank, but it does depend on the actual state of the rock.
If it's pores are
loaded with detritus from too much food/too little flow in the old system, then you probably want to consider pressure washing it to clean it. This can contribute unnecessary NO3 to the system at the beginning.
PO4 binds to the aragonite, but A) it can't be much and B) all growing life in the tank needs PO4.....this should rarely be a problem. Your tank should use up 100% of that PO4 as the biofilter grows in.....one good reason not to rush the initial cycle IMO....and to stock the tank very slowly.
One last BTW...
Take it easy on NO3 and PO4 removers, especially at the beginning.....zero is possible on both parameters and it's almost always harmful to your tank's ecosystem. The ocean does NOT have zero PO4.....and when you count bound PO4 (which as we know is transitional, not permanent) on the aragonite sediment, there's a
huge reserve there for the reef under normal circumstances. Exhaustion of PO4 is what causes many of the bad effects of eutrophication, like bleaching and mortality, ironically. Some algae turn toxic under PO4 deprivation so as to prevent predation/extinction while they're unable to repair or reproduce.
I'm rambling!!!!