Just as you asked about dry hopping in the keg you certainly can add coconut in the keg. I use a big nylon mesh bag.
1lb of coconut isn’t going to yield much flavor, especially in a beer as robust as a stout. I would encourage you to add more coconut. I use 1lb/gal.