TORONTO (Reuters) - BlackBerry Ltd said on Friday it has reached an agreement to sell the vast majority of its real estate holdings in Canada, as part of a plan outlined earlier this year aimed at bolstering the technology company's balance sheet.