Yes you can - it used to be that calipers were always rebuilt, you would rarely just renew the whole lot - probably because mechanics are now fitters, also it is quicker for garages just to replace calipers, costs us all more though as we are paying for the parts!
You will need new seals and I would always replace the pistons unless you think they will be perfect, stainless steel pistons is a good idea if you have the extra cash.
There are obviously things you need to check before reusing the casing, like for damage, once you have removed the pistons (good idea to pump them out quite far before you remove the caliper from the vehicle), check that the bores are good. If they are, rebuild away - they really should be, unless there was water getting into the brake system or the pistons were pushed in in a very rusty cruddy state.
Remove the pistons, GENTLY pry out the dust covers which will probably bring the wiper seal with it, and then gently pick out the old main seal. Clean the whole lot up with brake fluid nothing else, I tend to use old out of date stuff that I would not actually use for topping up (once opened it takes in water as the fluid is hygroscopic). Let fluid run in and around the channel on both halves to clean out any crud, sometimes you get a sort of algae build up. This is a kitchen table job - but remember the fluid will destroy paint and varnish.
Now once you are sure they are super clean start the reassembly, the big seals sit in the groove, use red rubber grease on reassembly or brake fluid if you can't get RRG, Once the main seal is in put the wiper seal covered in RRG or BF into the metal dust cover and then push that in. The best way I find to fit the seal/dust covers is a piece of wood, sit the cover evenly around the bore, then lay the wood square over the cover and press down on either side to drive them in. They are a pig, I have bent a few in the past and had to reuse the old ones; which is you should take them out carefully enough that you could reuse. As long as there is no damage to them and you give them a little clean they will work just fine as all they really do is retain the wiper seal and give it a little protection.
Once you have put in all the seals and things lubricate the piston and push it in, it will go in easily enough, be careful not to drive it in squint or you risk scratching the surface which will lead to a bad seal and or early rusting.