The correct statement is: The president has the role of Commander in Chief and has the power to direct the military as needed.
As Commander in Chief, the president has the authority to make key military decisions, oversee military operations, and ensure national defense, while also working closely with military leaders and advisors. The other statements contain elements of truth but do not capture the essence of the president's official role in the military accurately.