Can a rule be applied based on what other items are in the cart?

Yes, with Auto Add Promo Items (Free Gift) extension you can create a rule which adds a free product if the specified conditions are met, like 'give a free pair of socks if a pair of shoes is in the cart':

Y is socks SKU and X is shoes SKU

Auto Add promo Items - Amasty

 

 

Rate the answer?