This really depend on all sorts of details, but for the idealized situation, the following data will suffice:
In addition, call the distance between the camera and the two points $L$.
The camera's field of view ($FOV$) (or angle of view as is more common in photography) can be calculated by
$$
FOV = 2\arctan\left(\frac{d}{2F}\right)
$$
which, for a scene at distance $L$ corresponds to a scene dimension $W$ equal to
$$
W = 2\cdot L\cdot\tan(FOV/2) = \frac{Ld}{F}
$$
therefore, if two objects are $x$ pixels apart, and there are $y$ pixels in that dimension, the objects are
$$
W \cdot \frac{x}{y} = \frac{Ldx}{Fy}
$$
meters apart in reality.
As always, make sure you use consistent units; often, the focal lengths will be given in millimeters, while the detector size is given in inches and the distance from the camera to the objects in feet. Choose one system, and convert everything to that single system of units before calculating anything.
Now again, this is a first approximation and only applies to an idealized setup. In reality, there are many other things to consider, but the distance between the objects will roughly follow the relation above.
No, simply knowing the size and distance of a single object is not good enough.
That will allow you to determine the angle between any two points in a photograph, but to know the size of a second object, you have to know the relative distances to the observer of the two objects.
Obvious example: Just including the moon in a picture doesn't tell you the size of all other objects.
Best Answer
If you know the specifics of the camera (lens system, aperture settings, etc.), then you can make a direct relationship between the size of the image and the angular size.
But without a distance measurement (something the camera does not do), you can't turn that into an absolute size.
If there is other information in the photograph that gives the distance, then the size can be calculated.
If all you have is the image (and not the information about the specifics of the camera), then even the angular size cannot be calculated.