Who cares about county councils? A great many areas have no county council at all, in Yorkshire, this applies to everywhere from Doncaster to Halifax. Counties existed long before county councils were invented.
If Middlesbrough isn't in Yorkshire because it's not part of a county council, than neither is York.
Middlesbrough is as a matter of local government law, in the County of ... wait for it ... Middlesbrough!
See:-
https://www.legislation.gov.uk/uksi/1995/1747/made
The Cleveland (Further Provision) Order 1995
Cleveland: boundary changes
3.—(1) The county of Cleveland shall be abolished.
(2) A new county of Hartlepool shall be constituted comprising the area of the borough of Hartlepool
(3) A new county of Middlesbrough shall be constituted comprising the area of the borough of Middlesbrough.
(4) A new county of Redcar and Cleveland shall be constituted comprising the area of the borough of Redcar and Cleveland(4).
(5) A new county of Stockton-on-Tees shall be constituted comprising the area of the borough of Stockton-on-Tees.
(6) Section 2(1) of the Local Government Act 1972 (which provides that every county shall have a council) shall not apply in relation to the counties constituted by paragraphs (2) to (5) above.
As an aside, it is provisions like this which convinced me of the correctness of the "Traditional Counties" line, namely that local government counties are not - and often as is the case here bear no relation to - what people refer to as "counties". No legislation has ever sought to change the area or boundaries of what were before the 1880s called "counties".
What Wikipedia calls a "county" (and by extension the likes of the media, and other people who look things up on Wikipedia) is for its own reasons what the actual law calls "areas which are counties in England and Wales and areas in Scotland for the purposes of the lieutenancies", defined by the Lieutenancies Act 1997.
https://www.legislation.gov.uk/en/ukpga/1997/23/contents The current status of that law is here:-
Lieutenancies Act 1997
SCHEDULE 1
Counties and areas for the purposes of the lieutenancies in Great Britain
County for the purposes of this Act | Local government areas |
---|
Bedfordshire | [F1Bedford, Central Bedfordshire] and Luton |
Buckinghamshire | Buckinghamshire and Milton Keynes |
[F2Cambridgeshire | Cambridgeshire and Peterborough] |
[F2Cheshire | [F3Cheshire East, Cheshire West and Chester, and], Halton and Warrington] |
Derbyshire | Derbyshire and Derby |
[F2Devon | Devon, Plymouth and Torbay] |
Dorset | [F4Bournemouth, Christchurch and Poole and Dorset] |
Durham | Durham, Darlington, Hartlepool and so much of Stockton-on-Tees as lies north of the line for the time being of the centre of the River Tees |
The East Riding of Yorkshire | The East Riding of Yorkshire and Kingston upon Hull (City of) |
East Sussex | East Sussex and Brighton and Hove |
[F2Essex | Essex, Southend-on-Sea and Thurrock] |
Gloucestershire | Gloucestershire and South Gloucestershire |
Hampshire | Hampshire, Portsmouth and Southampton |
[F2Kent | Kent and the Medway Towns] |
[F2Lancashire | Lancashire, Blackburn and Blackpool] |
Leicestershire | Leicestershire and Leicester |
Lincolnshire | Lincolnshire, North Lincolnshire and North East Lincolnshire |
[F5Northamptonshire | North Northamptonshire and West Northamptonshire] |
North Yorkshire | North Yorkshire, Middlesbrough, Redcar and Cleveland, York and so much of Stockton-on-Tees as lies south of the line for the time being of the centre of the River Tees |
[F2Nottinghamshire | Nottinghamshire and Nottingham] |
[F2Shropshire | Shropshire and The Wrekin] |
Somerset | Somerset, Bath and North East Somerset and North Somerset. |
Staffordshire | Staffordshire and Stoke-on-Trent |
Wiltshire | Wiltshire and Thamesdown. |
Of course if you look at the heading of the first column, it says "county for the purposes of this Act"