It is a common practice on gas grills to smoke using wood chips in a manner similar that described in the referenced question: placing the wood chips in a foil pouch or pan, and allowing them to sit above the gas flame, smoldering, and thus producing smoke.
Note that in the described scenario, the method is the same, except for the fuel: the charcoal is in a foil pouch on top of the grill grate. It is in not down near the lines or elements for the gas flames. Although it may combust more thoroughly than wood chips, the purpose, effect, and outcome are essentially the same: producing smoke.
Aluminum melts at about 1,220 F (660 C); charcoal can burn at a about 1000 F. Furthermore, thin aluminum (such as foil) can burn as well, with an ignition temperature of about 1,440 F (760 C). So there may be some minor risk is that a hot spot from the charcoal could locally melt or burn the aluminum pouch. Both seem unlikely as long as the charcoal is only smoldering, and not burning with a full flame with good air pumping through through to create the highest temperatures.
So, while not traditional, and perhaps not as effective as simply using wood chips, this technique does not sound on the face of it to be completely crazy. For sanity, the air flow to the charcoal should be restricted (not too many holes in the pouch) which will limit the rate at which it can burn or smoke, and minimize the risks.
Still, being conservative, I would not do it; I would stick to wood chips.