I'm playing as England. When I try to declare war on one of Scotland's counties I couldn't: it says that the region is independent. I have a valid Casus Belli but still I couldn't declare war.
The game almost certainly told you that the county must be independent before you can declare war, not that is is independent. A county inside Scotland can't be independent.
To press a claim on a county that is part of a larger foreign realm, you must declare war on the top title-holder: in this case, you have to declare war on the King of Scotland in order to press your claim for that county, not on the little fish who actually has the county title.
To put it another way, you can't go to war with part of a foreign realm – you have to go to war with the whole realm, even if it's only to get a small piece of it.
The tooltip that shows criteria for declaring war says either
- (X) is independent
- (*) is indepenent
The red X means that the character is not independent. The green * means that the character is independent.