In MgO molecule the bond between Mg and O is ionic.
In my textbook, anything with a #DeltaEN > 1.5# is said to be ionic.
#Delta EN# is the difference in electronegativity. These numbers are very fuzzy and it depends on your teacher and textbook. However, as a rule of thumb, if they are on opposite ends (from left to right), they usually are ionic bonds.