‘He acts as if he is rich’. This sentence implies that the guy is rich whereas in ' he acts as if he was/were rich' there is an uncertainty over his state of richness. In the latter, he's probably not rich or at least we think that he is not rich. In the second example, both’ was and were’ are possible in informal and formal occasions respectively, and the difference in the tense of the verb following 'as if', in this case to be, indicates whether he is rich or not. But, if the verb before 'as if' is in the past form, then the following verb should be in the past form too;
*He acted as if he was/were rich
* He acted as if he was/were rich
In this case you have no choice but guess the meaning from the context. In the end, your example sentences are really ambiguous in the absence of the whole context.
*He struts around the garrison as if he were the commander in charge.( it must be clear. he is not the commander.)
*He strutted around the garrison as if he were/was the commander in charge.( he might be the commander or not, final deduction has to be made from the context.)
'He said that he strutted around the garrison as if he was/were the commander in charge'. If you report it this way. then you leave it to the reader to decide whether he is really the commander or not. in present it means the same . You need context!