I'm no expert, but......
I'd still say no, as to it being illegal.
Some barrels are sold outright threaded. Muzzle breaks, etc.
Now, take my Wather P22 for instance, it is already threaded, out of the box.
But, the ATF has all the info on various aspects on their website and have been reading through tons of their documentation lately.