The IBAN standards are managed by ECBS, the European Ctte for Banking standards, and you can find full details on
www.ecbs.org.
The sort code and account number are two elements of the IBAN.
In most cases, there is one sort code per branch. However, a bank can choose to have multiple sort codes per branch, or multiple branches per sort code. The important thing is that they should be able to identify the customer account correctly from the combination of account number and sort code.
One bank has adopted a standard whereby its account numbers are unique - it is only necessary to quote the account number (8 digits) to identify the account. Another has adopted a standard whereby it regards the sort-code and account number combination (14 digits in total) as the account number. I do not know the standards of all banks in this respect.
Where a bank amalgamates 2 branches, it may (a) operate as if these were two separate branches under one roof, with all customers retaining their account numbers and sort codes or (b) Retain the account number but change the sort code of the lesser branch's customers or (c) retain both sort codes, so that the customer has the option of retaining or changing his account number. The latter happened when my branch (BOI 34 College Green (now Habitat) was amalgamated with the College Green branch across the road. The result is that I have two valid sort-codes, but I have only one valid IBAN - that is the one printed on the top of my statement, and it matches the sort-code and account number on the statement.
To summarise, the sort-code and account number shown on your statement should match the account number and sort-code embedded in your IBAN. That is the one you should always use. If they differ on the statement, then the bank has made a mistake, and should be asked to correct it.