Two entries in the 1811 Dictionary of the Vulgar Tongue:
Dick. That happened in the reign of the queen Dick, i.e.
never : said of any absurd old story. I am as queer as
Dick’s hatband ; that is, out of spirits, or don’t know what
ails me.
Dicked In The Knob. Silly. Crazed.
My guess is that someone who was being a jerk was “dicked in the knob”, which was shortened to “being a dick”, and even shorter as “a dick”.
“Dicked in the nob” is a stand-alone phrase from 1811. It appears in Lexicon Balatron.: “Dicked in the Nob. Silly. Crazed.”
It didn’t appear in Grose’s Classical Dictionary of the Vulgar Toungue. It wasn’t in the 1788 edition , nor the 1796.
It did appear in his 1811 work named as I entered above.
Of course it probably was in speech well before that date.
Not much in print to suggest that the 1811 phrase went on to become “being a dick.” What would one be who was being a “dick?” It’s possible that it could have meant “penis” in the early 1800’s, but not much to prove it.