If it happens at Chancellorsville Before Jackson is wounded, is Jackson or Longstreet in command?
Longstreet was the senior of the two, but Longstreet was busy managing his corps at Suffolk so Jackson is going to take immediate command of the battle.
Longstreet will definitely be in charge. Joe Johnston was busy with the Army of Relief at Jackson, Mississippi, and was not going to relieve Longstreet (especially after his failure to relieve Vicksburg). Beauregard was hated by Davis and that wasn’t changing anytime soon.
Wilderness Before Longstreet is wounded
Again, Longstreet will be taking command of the Army of Northern Virginia. But it does create an awkward situation of having to work with Beauregard, his senior. But Davis would never allow Beauregard to command the premier army in the Eastern Theater.
Between Wilderness and Petersburg after Longstreet is wounded
This is a lot more difficult. Richard Ewell, by seniority, would have been entitled to take charge. However, Ewell later broke down at Spotsylvania and so command would fall to A. P. Hill. The issue is that A. P. Hill was so indisposed that he could barely ride his horse and had to be relieved. This leaves Richard H. Anderson to take command of the army.
What would happen next is beyond me. Richard Anderson may remain in command. Lee liked him, though his thorough combat record noted a lack of initiative. Johnston is busy fending off Sherman and Beauregard is a no go. Hood is a possibility; he outranks R.H. Anderson with his promotion to lieutenant general on September 20, 1863 and certainly was not an outsider to the Army of Northern Virginia. The last option is to bring Bragg from his position of military advisor to assume field command.
Do the ANV become a guerilla force if Lee is not present at Appotomatox?
For the love of... will this myth ever die? The officers were not suggesting guerilla warfare. The officers were discussing dispersing Lee's mostly surrounded army and fleeing in small parties to make their way to join up with other Confederates, such as Johnston's army in North Carolina. This is not the same thing as guerrilla warfare.