I guess you could place a resource on map directly... but if you place the resource on map, it will displace one already there if one was there. This happens with Indonesia. Also, a dummy building can be destroyed on conquest while lua would be required to remove a resource. The lua is relatively easy and I could do it for you... in my mod, I am constantly adding and deleting dummy buildings via lua for a variety of effects. (my code is likely clunky, but works... others could do it with more polish, I'm sure).
The building resource will be part of the buildings xml.
I don't think that you change the xml after the game has started. So randomly generating a resource that would be attached to the xml of the apothecary itself, I don't think is possible.
AFAIK. a resource can only added via lua or a dummy building (or the Indonesian trait), and for the reasons stated I believe the latter to be better way.
I suppose you could look at how city states do it... I am guessing, though, that they way they work likewise displaces a resource if one happens to be in the hex where the city state is generated. Maybe.