For the method I explained, yes.
There's another approach you could use to exclude your two-fer item from other cart discounts. Replace the single cart discount for All Cart Items with a series of product-specific discounts for eligible items, all using the same discount code. These discounts work by altering the per-unit price of the specified item by a flat amount, so you could calculate what 10% of the price would be and set the discount to that amount. When the buyer enters the code, all items in their cart which have a matching discount for that code would be discounted accordingly.