You can edit a page and drag a 'Content block' widget onto it. Edit it and it'll bring up the screenshot1. Select some text inside the editor window and select the globe icon on top. That'll give you an edit screen where you can select the page from your site, as shown in screenshot2.
Once your done, underneath the editor is a 'html' tab, click that and you'll see the html code with the sfref="[pages]4e77c475-c6d5-482d-96e4-83b09e312f3c".
Obviously you know all that because the sample shows the code already, so I'm not sure what the problem is unless you mean with "in the content body" hard-coded in a custom Masterpage ?
If so, the reference is a dynamic one, meaning that it will update within Sitefinity. It's the GUID reference for the page inside the db and how you can reference it through code.
If you like to keep it dynamic, why not place it in the template? Hardcoding it in a masterpage is no use, you can just use a regular a href link.