I think "Relict of" can only apply to Ann Buchannan. The space might indicate that they didn't know whose relict (widow) she was. However, the note at the bottom, if it clearly relates to this entry, suggests that she previously had an irregular marriage with James Ballantine, who has died.
If it was an irregular marriage, I think you're unlikely to find a direct record of it, though there might possibly be references in kirk sessions records and the like, where questions of morality etc were often discussed. Others more familiar with Scottish records might have a better idea than I do.