Both officer and official are persons with authority in an official setting, but they are different persons
In colloquial English, an officer usually means a policeman. In everyday English, officier is used in military, police or government organizations. In formal English, an officer is a perosn who has a position of authority in a hierarchical organization. In a corporate setting, however, officer is a holder of a corporate office, who has been vested with power and authority to run a busiiness.
An official is someone who is or has been legally authorized by government to do something by law, e.g. court official.