Modern middle chainrings designed for a triple crank will have shaped teeth and shifting enhancements to aid the shift from the granny ring to them. These are lacking on chainrings intended for use as the small ring on a double. So, you could use the smaller chainring from a double set as the middle of a triple but shifting from and to the granny will be a bit compromised.
Also chainrings are usually made and sold in sets so the shifting aids "line up" properly. A chainring from a different configuration probably won't shift as well anywhere as matched sets.