Military records for your ancestor should generally be included in his Compiled Military Service Records which you can obtain from the National Archives. The Confederate Research Center in Hillsboro, Texas may also have microfilmed copies of these records. These CMSR files should contain any record of a final parole or the taking of an Oath of Allegiance at the end of the war. I would expect a copy of the actual document to be in the files of the National Archives in Washington.
Confederate soldiers who were with their units, or on detached service, or in Confederate hospitals, when surrendered east of the Mississippi River [April 9, 1865 at Appomattox Court House; April 26, 1865 at Greensboro, North Carolina; or May 4, 1865 at Citronelle, Alabama] were released on parole and allowed to go home. In the Trans-Mississippi, most Confederate units disbanded and the men dispersed to their homes in the weeks and days before the Trans-Mississippi surrender agreement, dated May 26, 1865 at New Orleans, was actually signed by Lieutenant General E. Kirby Smith at Galveston on June 2, 1865.
This surrender agreement required the disbanded Confederate soldiers to report into Federal parole centers set up in key communities in Confederate held Arkansas, Louisiana, and Texas to be accounted for and to give and receive their final parole. Compiled Military Service Records that I have examined for Louisiana Confederate soldiers contain final parole records dated in June 1865 for those who did report into a nearby Federal parole center as required. There are many cases of duplicate paroles being given indicating that the soldier showed up at one Federal parole center while his commanding officer turned in a muster roll at another Federal parole center.
This "military parole" was a sworn oral and written promise given by an individual soldier not to take up arms against the United States in exchange for the freedom to go where ever they liked with the promise by Federal authorities that they would not be molested so long as they abided by their side of the agreement. This was a two-way promise which is why I use the phrase "to give and receive their final parole." Initially the phrase "until properly exchanged" was included in the promise to not take up arms, but with the surrender of all of the Confederate armies in the field, this became a moot point.
Confederate prisoners of war held in northern POW camps were required to take an Oath of Allegiance in order to secure their release after the war had ended. From April 9th until the end of May 1865, loyal Confederates held in POW camps agonized over what was the right thing to do since many of their regiments were still actively in the field for at least a month after Lee's surrender. In post-war society, Confederate soldiers who had taken an Oath of Allegiance prior to Lee's surrender at Appomattox Court House on April 9, 1865 were considered to have been disloyal.
President Andrew Johnson issued his first Amnesty Proclamation on May 29, 1865 granting full pardon to all who had taken part in the rebellion in exchange for their taking an Oath of Allegiance. Individuals who had been high ranking civil, military, and government officials of the Confederate States, and those with taxable property in excess of $20,000, had to apply personally to the President for their pardons. Taking the Oath of Allegiance under the provisions of this first Amnesty Proclamation has an entirely different meaning and intent from the giving and receiving of a final military parole. Taking the Oath of Allegiance was an act which restored one's citizenship. The military parole was a promise to refrain from further armed resistance against Federal authority in exchange for one's personal freedom to go where he pleased. Violation of this military parole could result in a former Confederate soldier being imprisoned. Otherwise, the ex-Confederate soldier could not be legally prosecuted or persecuted for his role in the war.
One of my great grandfathers was surrendered with the 12th Louisiana Infantry and released on parole under the Sherman/Johnston agreement dated April 26, 1865 at Greensboro, North Carolina. He returned home to Louisiana arriving in mid-June 1865. The first recorded evidence I have of his taking an oath of allegiance is his 1867 Radical Reconstruction voter registration certificate, a duplicate copy of which he preserved and which was passed down through the family.