You could make a trigger that check if the buying unit has the item, and if not remove the item, refund it and make sure the item has no cooldown in the shop.
EDIT:You could make a fake required research, and when a unit aquires the item, set its level to 1 trough triggers.(When it drops it set it to 0 again)