This strange old song (NSFW?) by Thomas Morley (c. 1557–1602) is trending over in /r/classicalmusic right now. Here are the lyrics courtesy of ChoralWiki:
Will you buy a fine dog, with a hole in his head?
With a dildo, dildo, dildo;
Muffs, cuffs, ribatos, and fine sisters' thread,
With a dildo, dildo;
I stand not on points, pins, periwigs, combs, glasses,
Gloves, garters, girdles, busks, for the brisk lasses;
But I have other dainty tricks,
Sleek stones and potting sticks,
With a dildo, diddle, dildo;
And for a need my pretty pods,
Amber, civet, and musk cods,
With a dildo, with a diddle, dildo!
Some comments on the internet say dildo may have referred to a loaf of bread (especially a dill-flavored one) back then, but this linguistics blog says there is evidence of contemporary usage in the modern sense. /u/intisun speculates that
[W]hile he doesn't have fancy things to offer the ladies ('Gloves, garters, girdles, busks, for the brisk lasses'), he does have 'other dainty tricks' to pleasure them ('with a dildo'). 'Amber, civet, and musk cods' are perfumes, which may have a sensual connotation as well.
but that still doesn't explain the hole-headed dog (unless that's a really weird euphemism for a penis). WTF is this song actually about?
Yes, dildo was used in the modern sense by the sixteenth and seventeenth centuries. Compare Rochester's poem, Signor Dildo in 1673
[G]o thither to make your Selfes Sweet,
By Buying of Powder, Gloves, Essence, or Soe
You may Chance get a Sight of Signior Dildo.
You’l take him at first for no Person of Note
Because he appears in a plain Leather Coat:
But when you his virtuous Abilities know
You’ll fall down and Worship Signior Dildo.
Or, even earlier, Nashes Dildoe dated around 1620, wherein the male protagonist leaves his partner unsatisfied and she takes out “my little dildo…that bendeth not / and stands as stiff as he were made of steele.” She says that her glass friend “refreshes her well / and never makes my tender belly swell [with a child].”
The 'fine dog with the hole in his head' likely refers to the fact that the higher-quality dildoes were supposed to shoot fluid out of them (warm milk is commonly suggested), it was seen as essential to women's pleasure. See this example of a high end 17th century dildo that had this feature: https://imgur.com/43G7nab There are a number of engravings (that I don't have on me right now) that show women's maids helping them with the pump action of these dildos.
However, the fine dog could likely refer to a penis as well, it's not too far afield from some of the bawdy songs I've read. I've written on the history of dildoes a number of times and you can find some of them here.