How can you get a one time use item back after it is consumed by a Pokémon? They took it or you gave it, they used it, so it is gone forever. However, this is not true for online and link battles!
On my Pokémon Moon copy for the Nintendo 3DS, I did this method in the wild. I used my Aegislash with the move False Swipe to leave Pokémon I encountered with one HP, and my Malamar with the move Switcheroo to switch my Sitrus berry Malamar was holding onto the wild Pokémon. Successfully, the Pokémon with one HP managed to consume the Sitrus berry. Unfortunately though, I did not receive the berry I had given to the wild Pokémon back after the battle. I did this twice by fainting the Pokémon and running away to see which way I could get my item back, but no luck. Items given to wild Pokémon can not be retrieved. I can assume this is what happens for every one time use items.
This is different for online and link battles because in my opinion, online battles are considered battling for fun, not serious like in the wild. You do get your one time use item back after giving it to the opponent Pokémon online or in a link battle. I have done this multiple times before when the battle spot was very active. I do not know if this is the case for every generation of Pokémon games as I have not played all of them. :/
I hope this helped! :)
Source: Experience