I was hoping there would be e.g. a Device Portal REST API type of solution here.
The HoloLens device portal does not provide an API for such functionality.
But if I used Unity/Unreal, I would not be able to get the positions of holograms created by other apps, right
Yes, by default you cannot access the position data of holograms across apps, but if you are using Azure Spatial Anchor and both apps use the same Azure account, then you can try to access the data through Azure Spatial Anchor, you can refer to Frequently asked questions - Azure Spatial Anchors | Microsoft Learn.
Say I wanted to find out the position of the start menu, is there any way of getting that?
If you're talking about the start menu on a HoloLens device, as far as I know there's no way to get its location because it's system controlled.
May I ask what is the scenario? Can you share more details about the project?