I do believe it is addressed in The Next Generation, field commissions are only tied to the place that issued the commission. Wesley, Cruncher was given a field commission of Ensign when he was helping out on the Enterprise during his mom's tour as chief medical officer, and a period of time when she was Chief of Starfleet Medical. He was still a cadet when he was at the academy, despite his ensign status on the Enterprise.
Also another thing we can look at is for control of the ship, during the Next Generation show when the Captain and all Senior bridge officers went down to the Planet Nemos to look for the Captain of the missing ship. The Captain went down at the request of Tasha because Commander Riker was in trouble and needed a commander for the Away Team, this left Geordie in command as authorized by the Captain, the person that had a higher rank than him came up not asking to surrender command, but give advice, because Operations officer said accounting to Standing Order that command can only be rescinded by the officer that gave him that rank, or of a higher rank than the rank that gave them that rank.
It also makes sense to because when Geordie tried to give Captain Picard his ship back with only the Battle Bridge neither Captain Picard or Riker did anything, and Captain Picard kindly refused the request stating when he gave him command the ship was in one piece and that is the only way he would accept the transfer of command. Riker was still XO so he would help Geordie if need be.
So Nog, if the cadet did have a battlefield commission of acting captain would have to get the acting chief medical officer to order a medical examination and to prove he is unfit for command, but if he didn't have a battlefield commission and decided to take over the mission himself he should have yielded command to Nog, or the ship would be considered a renegade ship by Starfleet's standards. Also renegade ships are considered stolen property and the starbase could arrest them.