J.E. Lighter, The Random House Historical Dictionary of American Slang (1994) puts the first occurrences of dibs in print at 1807 (used in the sense of money), 1827 (used in the sense of a portion or share), and 1932 (used in the sense of a first claim):
dib n. {prob. fr. dibstones, a type of child's jacks} 1.a. pl. money. 1807 Port Folio (June 6)357: You must put some more cash in your pocket./Make Nunky surrender his dibbs. 1821 Real Life in London II 57: The dibs are in tune—There is plenty of money. [Other citations omitted.] b. a dollar [Citations omitted.] 2.a. a share; portion. 1829 in J. Farmer Musa Pedestris 107: If you'd share the swag, or have one dib...{i.e.} the least share. 1859 Matsell Vocab. 25: Dib. Portion or share. b. pl. esp. Juve[nile] a first claim on an item. 1932 A[merican] S[peech] VII 401: Dibs on that magazine when you're through. [Other citations omitted.]
The fuller context of some of the citations in Lighter's discussion of dibs is as follows. From "The Song of George Barnwell," in The Port Folio (June 6, 1807):
Then said Millwood, whose cruel heart's core,/'Twas so cruel that nothing could shock it,/If you mean to come home any more,/You must put some more cash in your pocket./Make Nunky surrender his dibbs,/Wipe his pate with a pair of lead towels,/Or stick a knife into his ribs—/I warrant he'll then show more bowels.
From Pierce Egan, Real Life in London; or The rambles and Adventures of Bob Tallyho, Esq. (1821):
“All right my boy!” exclaimed Merrywell “bring your bellows ["snuff"],in good order, and don't be afraid' of your bread basket ["stomach"].“ The dibs are in tune. A ball of fire ["glass of brandy"], a dose of daffy ["Daffy's Elixir," a patent medicine introduced in the 1650s], or a blow out of black strap ["drink of gin or rum mixed with molasses"], will set the blue devils at defiance, give a spur to harmony, and set the spirits a jogging."
From "On the Prigging Lay" (1829), in John Farmer, Musa Pedestris: Three Centuries of Canting Songs and Slang (1896):
When twelve bells chimed, the prigs ["thieves"] returned,/And rapped at the ken ["house"] of Uncle ——:/"Uncle, open the door of your crib/If you'd share the swag ["plunder"], or have one dib./Quickly draw the bolt of your ken,/Or we'll not shell out a mag ["half-penny"], old ——."
From George Matsell, Vocabulum: Or, The Rogue's Lexicon (1859) [a glossary entry]:
DIB. Portion or share.
From these citations, it appears that the meaning of dibbs/dibs evolved in slow but orderly fashion from dibstones (the children's plaything) to money to a portion or share in some benefit or distribution to a first registered claim (as of right) to possess something.