When you use Knock Off against a Pokémon with the Pickpocket Ability that is also holding an item, Knock Off will just knock off their held item.

If you used Knock Off against a Pokémon with the Pickpocket Ability when they don't have a held item, the Pickpocket Ability will activate saying you have gained the targets item, but immediately after saying that it says the item was knocked away by Knock Off. So basically you gain the targets held item but immediately lose it.