For the most part, yes. There maybe some differences with axle spline count and the carrier (Depending on the gear ratio used) Also remember that you should not use a reverse rotation gear set in a standard rotation axle.
Although it's been done before, I wouldn't suggest installing used gears into another axle because it maybe impossible to set up the gears to mimic the previous wear pattern in the new axle. This means that your gears can have a very short life with an improper wear pattern. OTOH, you can use a used locker in a different axle, but while you're at it, you might as well rebuild the diff. especially if the axle spline count is different.
Ed