depending how much meat is on the hub body, you might be able to lathe/ re-thread the outer threads of the freewheel side to allow a proper lockring to be fitted, then problem solved in a satisfactory way.
welding? hubs likely to be alu, cog is steel? I smell failure. Even if both alu, unless exactly the same gauge and type, neigh on impossible, and will probably weaken the hub to the point of it being dangerous.
depending how much meat is on the hub body, you might be able to lathe/ re-thread the outer threads of the freewheel side to allow a proper lockring to be fitted, then problem solved in a satisfactory way.
welding? hubs likely to be alu, cog is steel? I smell failure. Even if both alu, unless exactly the same gauge and type, neigh on impossible, and will probably weaken the hub to the point of it being dangerous.