Hmm... it all depends.
But taking out any and all other factors. An item slot is more important.
If there was an item that had the exact same stats/ability as an ability, I would sacrifice the item. This would allow for another item to take it's place, thus increasing the character even more.
Now taking in other factors.
If picking the ability means I cannot pick another ability that is more important down the line, then I would sacrifice the ability and keep the item.
If the item's stats can stack with the ability's stats, then I wouldn't sacrifice either of them.
If both of the above factors are true, then if the combined stats are greater than the ability-Y then I would keep both.
And so one with the factors.