The Starks are 8000 years old - you REALLY telling me they've NEVER had a ruling Queen?
No, GRRM has even explicitly used the Starks as an example of being continued through the female line several times. Hell, we even have an example in the books - once Harry Hardying takes over the Vale, he
will be Harry Arryn.
That is how you get 8000 year old houses despite the combination of non-Salic succession and patrilinearity, which is a really, really
dumb combination, anyway - because it means every so often you do run into the problem of a single child daughter inheriting the lands, and then you need to make special arrangements to preserve the name. IRL, even British nobility used Salic succession, it was only the crown which didn't (and even then that was only really fixed in the 18th century, well after the middle ages).
But the ruling houses are
so established in Westeros, nearly always those special arrangements will in fact be made - people are usually going out of their way to maintain the family names of established houses, especially of course Great Houses. If you inherit, say, the Golden Tooth, you
will call yourself Lefford for the sake of legitimacy, even if you had another family name before, and that goes doubly so for Lords Paramount. So whenever you do have a daughter inheriting (which, again, is not
that uncommon), chances are you will get some degree of matrilinearity.
And as
@Teen Spirit mentioned, there was an arrangement in place here, too. It's just...
It's still completely stupid. What is Driftmark compared to the Realm? The rank difference is boggling, and yet the kids still get the Velaryon name as default? Who the everloving fuck negotiated that trash of a marriage agreement??? At the very least the default should have gone the other way around.