a former officer or employee of the United States who is carrying out official duties as an employee or as an elected or appointed official of a tribal organization (as defined in section 5304(
l) of this title) or inter-tribal consortium (as defined in
section 5381 of this title) may act as agent or attorney for, and appear on behalf of, such tribal organization or intra-tribal consortium in connection with any matter related to a tribal governmental activity or Federal Indian program or service pending before any department, agency, court, or commission, including any matter in which the United States is a party or has a direct and substantial interest:
Provided, That such former officer or employee must advise in writing the head of the department, agency, court, or commission with which the former officer or employee is dealing or appearing on behalf of the tribal organization or inter-tribal consortium of any personal and substantial involvement that he or she may have had as an officer or employee of the United States in connection with the matter involved.