Partly yes, with Cockney. But there are rules about being a "true Cockney". You have to have been born within the sound of "Bow Bells". That means the bells of St Mary-le-Bow, in Cheapside, London. But there are dialects all over the UK that have certain words and phrases unique to them.