"The literal meaning of rat is, of course, “a rodent resembling a large mouse, often with a naked or sparsely haired tail.” ... The sense of rat as “one who abandons his associates” was in use in 1629. rat as a noun. rat – a despicable person, especially one who betrays or informs upon associates."
Not confined to the mob son
https://www.google.com/search?q=Origin+of+you+dirty+rat&rlz=1C1SQJL_enUS805US807&oq=Origin+of+you+dirty+rat&aqs=chrome..69i57.5518j1j8&sourceid=chrome&ie=UTF-8