Can a soldier disobey orders? In some cases they can.
The military is a hierarchical organization. Some degree of obedience to the orders of superior officers is required for the organization to function. But those who serve in the U.S. military are not automatons, and they are not asked to surrender all independent moral judgment when they sign their enlistment papers. American service members are defending a nation of laws, not of men. Their obligation to obey the orders of their superiors does not include orders that are palpably illegal.