I have never heard of or seen anyone else do this, and not sure if it's recommended, but I have pre-washed a skein or two of yarn, to get a strange smell out.
I washed it just by hand in the sink, using a product called 'Eucalan' which requires no rinsing. I think it has eucalyptus essential oil in it and I don't know what else, but it does smell rather nice, mild.
I then wrapped my skein in a towel, and stomped on it to get most of the liquid out....then left the skein to dry.
It did take many days to dry though, but the smell subsided or disappeared entirely. This was years ago, so I can't remember exactly how long it took. If you have heat ducts in your house, you can place it atop a duct where air circulates. I think I put mine next to my woodstove. (we don't have a furnace, so no ducts.)