"My friend wants to buy a bag of apples."
Check back if it is still the same. Sometimes Duo changes answer silently. After all it's in beta.
There is no strict definition for 袋 and 包, just 袋 tend to be open or closed but not sealed; 包 tend to be closed, and sealed.
I had mentioned in another thread that when I saw apples being sold in a supermarket in sealed plastic bags, by habit I would still call them 袋.