My best guess is that it would normally be at the discretion of the individual (with unit commander concurrence) who performed the official role of unit chaplain, regardless of whether that chaplain held rank.
Two snippets of information found, involving Confederate chaplains, might provide some indications for resolving this.
Sam Watkins, 1st TN (CSA), in his memoirs ('Co. Aytch' reprint, at p.106), refers to the appointed chaplain of his regiment, Charles Quintard, choosing to march and carry his knapsack daily through the whole of the war, just like any other soldier. (Presumably, his willingness to share in the ordinary soldier's toil and plight might have reasonably extended to falling in with the ranks during dress parades and at assemblies too, unless he was otherwise occupied conducting ministerial duties).
Similarly, the assigned chaplain to the 49th TN (CSA), James McNeilly, went through the war experiencing the same burdens as ordinary soldiers, which included going into combat. When Hood deployed his troops for the assault at Franklin, McNeilly decided to join the assembled line and move forward with the litter bearers behind the advancing infantry, exposing himself to enemy fire like his comrades. ('Confederate Veteran': Vol. 26, at p.117).
Although both of these unit chaplains mentioned did not appear to hold a military rank, thought they typically chose to join in formations with the rank-and-file of their own volition, in order to gain the necessary respect and approval of fellow soldiers that they dealt with. Don't think a worn rank would have made any difference to this freedom of choice exercised by such individuals with special roles (unless, alternatively, their unit commanders insisted on select positions within set formations).