Stepper motor with double output shaft
Motors are carefully engineered devices.  Modifying one is costly, error prone, and most likely violates the specs.

Get a motor that has the shaft protruding at both ends.  That's a somewhat unusual requirement, so may be difficult to find.  Look around on various distributor web sites to see who makes roughly the kinds of small motors you are looking for, then look on the manufacturer web sites to see if any of them make what you want.

You should also step back and see if you can fix this problem at a higher level without requiring a weird part at the low level.  Even if you find the right motor, you'll be stuck later when that one part goes obsolete.  Designing with mainstream parts has the advantage of being able to find replacements without too much re-engineering when some of the components become unavailable later.