The IGI does have a christening for a Mary Heslop, with parents as William and Mary - this on 12 JUN 1815 Wolviston, Durham.
Curiously, the only listing for a Dorothy Heslop c1831 shows a mother as Elizabeth, but this is a submitted IGI entry.
It's possible that the age difference between William and Mary might be down to them having different mothers - after all, its less than 30 years and if William's mother died and his father remarried it could explain the cousin connection.
However, I think the term may also have been used a little more loosely in the 19th century, so it could well be that Mary b1846 is actually the neice of Dorothy and James, as you suggest.
I'm sure you'll puzzle this out with further digging!
cheers
Paul