Not that I know of. The closest stock solution I personally use is to take activate the utility to take a screenshot of a screen portion (<kbd>Command ⌘</kbd>+<kbd>Shift ⇧</kbd>+<kbd>4</kbd>). The cursor will turn into a crosshair with the screen's horizontal and vertical pixel coordinates. You then have to apply some math to determine the distance between the end-points you want to measure. Not ideal, but better than nothing.

You can also try using xScope, a nice 3rd party utility which makes life a little bit easier with dedicated tools, but it is zoom agnostic, so make sure you measure at 100% zoom.

Photoshop is the only tool that effectively takes pixel distances regardless of the zoom level, but you have to open the image or at least a screenshot (if you take it from a website or PDF) in Photoshop.