I have done this, JE is correct, if it is soft solder, you can proceed with little risk to the barrel, you can also proceed if it is silver solder with caution, a slow heating approach is needed with either and as soon as the solder bubbles remove the flame and tap off the sight with a brass drift os suitable size and weight. It may be necessary to heat and move the sight in steps, as the solder solidifies quite quickly when the heat drops.
If you're uncomfortable doing this, I would get a gunsmith to do it.
Cheers.
gun)