Yes he was but there was no large standing Army in those days. What led to Virginia and a other states like North Carolina that really didn't want to leave the Union seceding was Lincoln's request that these states provide him with troops to raise an Army put down the rebellion in South Carolina which actually started after he was elected but before he took office. James Bucannan did nothing about it because he didn't think there was anything in the U.S. Constitution that would prevent a state from voting to leaving the union, plus he was leaving the White House anyway so he kicked the can down the road. Lincoln was determined to keep South Carolina from leaving the Union because he wanted to collect the tariff on goods coming into the port of Charleston which was a major source of revenue for the US Government.
Lee was offered the command of the Union Army but not wanting to take up arms against his fellow Virginians he resigned his commission when Virginia voted to leave the Union.