The Obama administration is considering a military trial in the United States for a Hezbollah commander now detained in Iraq, U.S. counterterrorism officials said, previewing a potential prosecution strategy that has failed before but may offer a solution to a difficult legal problem for the government.