Queen Elizabeth doesn’t have to break the rules — she makes the rules.
There was a decree on the books from 1917 her father, King George V, declaring that only the oldest son of the Prince of Wales’ oldest son could have the title of “prince,” meaning that only the first boy born to Prince William would also be called a prince. The rest of his children would have other titles.
But Queen Elizabeth does not hold with that. She has issued a royal decree to change the rules. The decree reads (via the London Gazette):
The Queen has been
pleased by Letters Patent under the Great Seal of the Realm dated 31
December 2012 to declare that all the children
of the eldest son of The Prince of Wales should have and enjoy
the style, title and attribute of Royal Highness with the titular
dignity of Prince or Princess prefixed to their Christian names
or with such other titles of honour.
This was an expected change after it was announced that Britain and all the 15 other commonwealths that recognize the Queen as their monarch are going to change the succession rules so that males no longer have precedence as heir. The reason Queen Elizabeth is the reigning monarch is because her father had no sons. If she had had a brother, even a younger one, he would have succeeded to the throne instead.