As it had been discussed on a few threads before the number 26 is incorrect, meanwhile I also deleted it from wikipedia as the given source for that number did not say so either but that at least 26 managed to get out of service (supposedly meaning legally) and went south. Said book (How the North Won: A Miilitary History of the Civil War by Herman Hattaway and Archer Jones) doesn´t have footnotes for those numbers but gets several numbers wrong. In one of the threads it said that 26 maybe comes from the 26 men reported deserting from the 7th U.S. Infantry in New Mexico before it went to the east.
Meanwhile Earl Van Dorn, who was in Texas with a major portion of the Regular Army, had reported hundreds of deserted regulars joining the Confederate forces which obviously makes 26 as a total incorrect. Enlisted men wanting to go south indeed didn´t have many options as they couldn´t resign. Either asking to be, or trying to get, dismissed, becoming a deserter or waiting till the enlistment term ended. Total numbers can only be estimated.
Meanwhile the officer corps could resign; though of course those resignations had to be accepted by the war department and could be denied (often resulting in a dismissal, and occasional incareration, instead) which happened more frequently as the war progressed.