The meanings of these two terms are quite subtle. The word ‘officer’ is comparatively specific, but its meaning varies somewhat according to context: -
1. A person of any rank and either gender in the police force – so a policeman or policewoman of the lowest rank (a constable) can very properly and politely be described as a police officer.
2. A person of superior rank in the armed forces – in the British army, anyone from a Second Lieutenant to a Field Marshall
3. A person with a named function in an organisation – for example, ‘This association has three officers: Chairman, Treasurer, and Secretary.’
The word ‘official’ is rather vague, but tends to mean an employee or staff member considered to have (or pretending to have) some importance, and generally working in a senior administrative capacity.