It's been a while since I looked at the primary end of the KX5 crank, but I seem to remember that gear has a shaft on it that fits into the end of the crank. Obviously, something would have to cause it to rotate with the crank, so it must be coupled in some way. If there is no flat side to the shaft, pin through it or other externally visible means of coupling the two components, it seems logical that it might be a press fit and may even have a locking agent applied. Find a parts schematic to determine if it's threaded but I don't believe that it is, as I don't know what you would use to torque it.
If after removing the primary gear you cannot grab the backside of the drive gear with a puller, you may be able to drill the center and insert an extractor or, as you suggested, weld another piece to it to allow you attach a makeshift puller or a gear puller with a slide hammer attachment. Heating the end of the crankshaft while pulling the gear should ease removal by expanding the ID of the hole in the crank that the drive gear shaft is in and reducing the interference fit (and would also help break down any locking agent).
Hope it helps, let us know how you make out.