Welcome to the community!
As already mentioned, you own the phone after your contract has completed. Unlike some providers which have started to offer leasing options (ie Upfront Edge etc), Fido finances the full cost of the device with their Payment Program. Since the entire cost of the device will be paid by the end of the contract, you will not be required to return the device nor would there be any remaining balance to pay in order to keep the device.
In addition, as of December 1, 2017 Canadian mobile providers are required to provide unlocked devices as per the Wireless Code (see here). In compliance with the Code, the devices offered by Fido are all unlocked.
Hope this helps 😀