What is the correct way to refer to someone during when they previously held a different rank/position/title?
Solution 1:
I couldn't find a source to cite, but I'm a professional editor. As you assumed, all three are correct. The first two examples, using then, indicate things Petraeus did when he held those ranks (major general and lieutenant general). The third, using former, indicates something he said after he was a general: that is, he was a former general when he issued the apology. I would use the same words (then and former) to describe things someone did in a different status and when no longer in a certain status.