In the UK an Ophthalmologist is someone who tests and treats your eyes, diagnosing medical complaints, prescribing corrective spectacles etc, i.e. what you call an Optometrist. He or she then refers you to an Ophthalmic surgeon or other doctor if they detect a medical condition.
Same confusion reigns in my field. In the UK, an anaesthetist is a medical doctor who specializes in the perioperative care of surgical patients and in the administration of anaesthetics. That same person in the US is an anesthesiologist; while an anesthetist is an advanced-practice nurse (somewhat analogous to a nurse practitioner) who administers anesthetics with a greater or lesser degree of consultation with a physician, as required by the state in which s/he practices.