How remove front bearing in dremel 398 rotary tool?
This bearing looks like it was pressed on from the splined end of the rotary shaft. Pull the shaft, tap it gently with a brass rod or a socket which fits around the bearing but won't score the shaft. Do this and the bearing should come off.

Edit to add to my earlier question based on the new image: 
On a splined shaft as seen on your third image there should be a means to disconnect it safely from the plastic hub (or potentially clutch). Because the inner race of the bearing will be to large to fit around he non-threaded or splined portion of the rotary shaft the only means to replace the bearing is to entirely disconnect the shaft. That said, smaller splined shafts like this often only go back one way so be sure to make exactly how it is in its assembled orientation.