Is there any kind of software or device for measuring the height of something (that you can’t get close to) in a photo? Or is the only way to place something you know the exact height of next to it? Hope that makes sense.
I think with just a photo you would need to have an object in the picture that you do know the height of & the distance from the camera to that object and the distance to the thing you're trying to measure.
I agree with Dave, there are measuring apps that use trig but as you have no way of knowing the distance from the camera to the building then you are a component short.
You need to know the horizontal distance from where you are measuring to the foot of the object; then you need to know the angle between the horizontal and the top of the object, then you need to know the vertical distance between your eye and the bottom of the object. A clinometer (Home-made or bought) can tell you the angle and then you work it out by trigonometry. I doubt if any software could give you an answer simply by showing it a photograph.
If it's a building you could possibly measure one of the storeys and calculate from there. Possibly count brick courses? Is this anything to do with planning matters?