To me, thhe first sentence is correct, the second one doesn't seem complete.
The first sentence means that he is one of many managers in the company, the second one should read.
"He is the manager of the company"', implying that he is the only, or top manager, as psmithphil already mentioned.
The second two sentences
He imagined him as manager of the company.
He imagined him as a manager of the company
If the subject that is being imagined is the subject himself, then it should read.
He imagined himself as manager of the company.
He imagined himself as a manager of the company
In this case, I'm not quite sure why, neither sentence needs "the" before the word manager to imply the only or main manager, but it still holds the same meaning.
If the subject being imagined is not the subject himself, but another person, then these sentences are both correct.