Sergeant Shadwell is looking for one of the traditional signs of witchcraft.
That is, the answer to the question, “Is there actually a traditional connection between witchcraft and nipples” is yes.
Specifically, it was believed that a witch would often have a familiar: a demon in the shape of an animal, or an animal bound to their will through magic, or something along those lines.
As such, the witch would grow an additional “witch’s teat,” by which these demons could be fed on blood. This teat could also be used for other satanic purposes. Per Wikipedia:
The witches’ teat is associated with the perversion of maternal power
by witches in early modern England. The witches’ teat is associated
with the feeding of witches’ imps or familiars; the witch’s familiar
supposedly aided the witch in her magic in exchange for nourishment
(blood) from sacrificial animals or from the witch’s teat. It is
also where the devil supposedly suckles when he comes at night to bed
his faithful servants, sometimes impregnating them with his seed. Once
the devilish half-breed has been conceived, the cambion may only feed
upon this teat and no other. Folklore suggests that on the 7th day of
the 7th week of consecutive feeding upon the teat, the cambion would
grow to adulthood immediately and begin wreaking havoc with a range of
demonic powers inherited from its supernatural father. However, should
the ritual be disrupted during the 49-day period, the process has to
restart all over again.
In particular, the most famous Witchfinder General, Matthew Hopkins, (to whom Shadwell undoubtedly owes a great deal) had a particular fixation on the presence of the “devil’s teat” as a way of identifying witches. Here, for example, Hopkins insists that such teats will be identified by numerous skilled observers, who can rule out any putative natural cause.
Quer: Many poore People are condemned for having a Pap, or Teat about
them, whereas many People (especially antient People) are, and have
been a long time troubled with naturall wretts on severall parts of
their bodies and other naturall excressencies, as Hemerodes, Piles,
Childbearing, &c. and these shall be judged only by one man alone and
a woman, and so accused or acquitted.
Answ.
The parties so judging can justifie their skill to any, and shew good
reasons why such markes are not meerly naturall, neither that they can
happen by any such naturall cause as is before expressed, and for
further answer for their private judgements alone, it is most false
and untrue, for never was any man tryed by search of his body, but
commonly a dozen of the ablest men in the parish or else where, were
present, and most commonly as many ancient skilfull matrons and
midwives present when the women are tryed, which marks not only he,
and his company attest to be very suspitious, but all beholders, the
skilfulest of them, doe not approve of them, but likewise assent that
such tokens cannot in their judgements proceed from any the above
mentioned Causes.
The Discovery of Witches, Matthew Hopkins
There are various other objections that Hopkins addresses in this work, many of which center around the use of the “devil’s teat” to identify witches.