How can I build a support onto a stud in order to support a handrail?
You can install one or more handrail brackets under the railing and line them up directly with the studs. You should be able to find them at any hardware store:



Alternatively, yes, you can open the wall and install a nailer (2x4 installed horizontally between the studs), but this will require some plaster or drywall patching and painting. I would fix the nailer in place with screws to minimize the vibration that may cause more damage to the surrounding drywall. To avoid opening the wall up too much, I'm guessing you'll end up going in at an angle from the front and bottom of the nailer into the stud. It would be better to go in from the opposite side of the stud, but that would result in a lot more wall to repair (you want any joints to be on a stud).