38,000 years from now when each weapon has it's own (nebulously defined, possibly only superstiion) machine spirit it seems possible to me that a sight could be reconfigured to work with two, or more, different guns, heck, I can buy a sniper scope today with markings for two different rounds so it can be used on two different rifles. I could very much see attatching the scope to a weapon, it interrogating the machine spirit, and adjusting it's predictions accordingly. It would probably require a tech-use roll to do this in the field though due to calibrations and whatnot.
As for modularity? that's basically what Marines DO! Their armour is designed so parts from a half dozen different marks, and goodness knows how many sub-marks, can swap and interchange pieces and components at will. Their standard transport, the Rhino, can be reconfigured into at least 2 different types of tank (Predator, Vindicator) Artillery (Whirlwind) or IFV (Razorback). The Land Raider has another half dozen variants (Phobos, Crusader, Achilles, Helios, etc). There is also somewhat of a tradition of field improvistations becoming standard throughout chapters (Predator Annihilator, Land Raider Redeemer).
But they can't take a sight off one gun and attach it to another? That stretches my disbelief somewhat