Yes, the shims act as a gasket on some applications. Just use a little brush-on Permatex sealer to prevent seepage between the shims as you reassemble it. Sometimes the front bearing cone is a TIGHT slip fit on the pinion gear, so a press is a good idea unless you want to risk damaging the bearings with more hammering. You'll probably find the rear bearing cone is a tight press fit onto the pinion gear. The bearing cups will be pressed into the housing you just removed. Once you've got the pinion out of the housing, wash and inspect the bearing cones and cups. If they don't have score marks or flat spots, you can probably reassemble the unit with just a new seal. Why did you take it apart in the first place- - - -noise, or just leakage?
There's a process called "preloading" the bearings, where you tighten the yoke nut until there's a specified amount of drag as the pinion turns in the housing- - - -measured in inch-pounds, so don't overtighten the nut! If you can find a factory service manual, most of them show a pretty good step-by-step procedure for disassembly, inspection, and reassembly.
Jerry