Hey Succesa, you may be confused about the effect of the Knock Off attack. Knock off removes the item from the opposing pokemon, but you do not get the item. In order to gather rattata hairs or nocturnal feathers, you will have to catch the pokemon or use either Trick/Covet/Thief. If you choose to use trick/covet/thief, make sure your pokemon is not holding any item already so it can safely take the rattata hairs/nocturnal feather without any mishaps.