Would it make sense to apply linseed oil before sanding and then sand the piece and then eventually apply the oil again? In order to create less airborne sawdust. Or it wouldn't make much difference?
Or it wouldn't make much difference?
Yes it'll make a big difference normally, it could cut airborne sanding dust down to virtually nil.
It's actually fairly common now to wet-sand wood with the finish used (usually oil or a blended oil finish such as "Danish oil", but sometimes using straight varnish). This is not primarily to keep the dust in check though, it's mainly used I think as a means to fill grain with the finish/dust slurry generated1.
However this process is not commonly employed for what you might call bulk sanding where you're removing a lot of material, which I think is what you're asking about. Instead it's just at the finish stage (usually with only the last one or two grits used). Bulk sanding is almost always done using power sanders anyway2 and the means to control dust effectively should be built into those and made use of where possible.
So if you are power sanding, dust extraction or other means to control sanding dust such as downdraught sanding tables are probably the things to look at.
Alternative way to create less dust, sand less
First would be to improve your planing — hand planing, not machine planing. It's challenging to truly finish-plane wood (where literally nothing else touches the wood before you apply finish) and virtually no Western woodworkers do this all the time, although it is the aim for a number of hand-tool aficionados. But even for leisure woodworkers who don't have much time to practice it is within the grasp of most to hugely reduce the need to sand by learning to plane to a decent level.
You can reduce the need to sand even further with scraping. Scraping can become your primary means to complete smoothing of wood if you practice at it and for a lot of common projects it is relatively easy to scrape much much more than you sand. More on the difference in this previous Answer, What are the differences between sanding and scraping?
1 Safety note: the slurry or paste that is generated by this process is a fire hazard for the same reason that oil-soaked finishing rags are, and any excess should not be left in a pile, swept onto the floor or placed loose in the bin/wastebasket as it can spontaneously combust.
2 Except for smaller pieces it's extremely punishing to sand from rough to smooth entirely by hand and I don't think anyone would choose to do it if they knew of alternatives.
In my experience what you propose works fine. You can sand the wood while the wood is still wet from the oil. However, I do not use oil with initial sanding, only for the final sanding, although it's worth giving it a shot with the initial rough sanding - you can't go wrong.
Recognize that this technique quickly clogs the sandpaper (that's where part of the sanding residue goes instead of into the air).