The distinction between the example in the WordReference thread and the example in CGEL is that one is referring to a role, and the other to an identity.
As a role, we can talk about "being a president" - "Joe Biden is a president", "Paul von Hindenburg was a president". In this case, "a president" is "something that you are" - we can also say "Joe Biden is a man", "Joe Biden is a Democrat", etc.
However, this doesn't mean that Joe Biden is "something", because Joe Biden is an identity. We can refer to the same person as "the 46th President of the USA", or in the right context simply as "the President". In this case, "the president" is clearly "someone", not "something".
When we're using a pronoun to refer back to "the president", we are using it in the "identity" sense - we are talking about Joe Biden or Paul von Hindenburg, not the role of head of state. That means we need to use "himself" or "herself"; or, in case we're not sure or want to recognise a non-binary gender identity, "themselves" (or "themself", which some purists dislike but is quite common colloquially).
We don't use "it" when referring to people, so we would say "Joe Biden himself" and "the President himself"; never *"Joe Biden itself" or *"the President itself".
So, we have:
He has the ability to be something
What is it he has the ability to be?
To be a president
But:
I think someone is coming
Who is coming?
The President himself
It's worth adding that the CGEL example has been contrived to make a point about theoretically possible grammar, which is why it sounds a bit awkward. To imagine some context for it, let's say John and Mary are being given parts in a play:
"Mary, you will be the president's wife" said the director.
"And who will I be?" asked John.
"You will be the president himself!"
In this case, "you" and "himself" are actually referring to different people: "you" refers to John, the actor; "himself" refers to "the president", the person John will pretend to be in the play. This is the point CGEL is making with the example.
This also allows us to answer this question:
Am I right that "himself" means the gender of the subject "you" is masculine?
No: we can imagine if Mary was given the role of the president, and identifies as a woman; but the character being played was a man (maybe it's a play about John F Kennedy). "You" would refer to Mary, and in the third person it would be "She will be the president himself".