If you look at PokemonMinigameTriad, you can search up that you can buy cards that you own in your PokéDex, I don't think it would be hard adding an item with a descrition of what it does, stick that in your key items pocket, or, I would probably make a new pocket, and use a script directly after the adding of the card:
Which quickly browsing keep be any of the following;
The only thing I can see being a problem, Triad, registers cards in your PokéDex, so if you try to recieve a card that isn't in your Dex, I can't say what would happen... It's also possible that there is no way to do this, but as I said, I only had a quick scout and that's what looks to be the more achievable option... I can't offer you a solution but maybe this is a good place to start looking into, believe me, without actually playing aruond with the scripts you won't learn anything, I'm learning but Maruno still finds flaws in my methods, have a look in the Triad script section and see what you can come up with, then message back.
Receiving a card from an NPC is easy; it's just the same as receiving a regular item. Use $PokemonGlobal.triads.pbStoreItem(PBSpecies::BULBASAUR,quantity). That won't show any messages. You'll also need to make sure you're able to add them all first ($PokemonGlobal.triads.pbCanStore?(PBSpecies::BULBASAUR,quantity)).
Having a wild Pokémon hold a card is potentially difficult, depending on what exactly you want. If it should hold a "Mystery Card", which is just a random card (use it to discover which card it is and add it to your Library), then that's easy enough to do. If the card needs to be the species of the holder, then you might want to just auto-gain the card upon capture (adding it immediately to the Library) and "pretend" it was holding it, rather than have the card be an actual item (there's nothing similar to compare this to). Anything else (the card depends on some other factor) is even harder to do.
You could have an item usable in battle which scans the opposing Pokémon, and create a card out of it (which is immediately added to the Library). Probably not a Key Item, though, since that would just become a money generator by infinitely scanning Pokémon and selling the unwanted copies. Perhaps a "Blank Card" item which is just turned into a Triad card (ostensibly done by an invisible printer, like how TMs are ostensibly used by a device they go into to teach their moves). This could still be abused for infinite money, so maybe you could have tiers of cards, each of which costs a different amount and can scan a certain value of species, to at least reduce this effect.
There is absolutely no problem with giving the player a card of a species they haven't yet owned. That restriction solely applies to the available cards in the card shop.