Hello. Thank you for coming to JustAnswer with your question, and welcome.
If you are taking an extended release metformin, it is probably what is known as a "ghost pill". The outer casing can be expelled in the stool after the contents have been absorbed. I would imagine that the casing gets hardened as it passes through all the digestive enzymes and movement of the bowel.
There are many people who post onto forums about this problem. Your finding of a white powdery substance inside the pod would also confirm that this is a medication.
You might check to see if the number of expelled "pods" coincides with the number of metformin you take. I would guess that other medications can do this sometimes, but metformin seems to be the "culprit" with most people who complain of this.