I'm not quite sure how one would go about that, as a normal optical rangefinder uses two optical paths a known distance apart. I suppose an app could use a magnified image from the camera plus, assuming it's possible, a manual focus slider and a distance display. I've not looked. But I have a Perkeo II and another folder and did in fact acquire some accessory rangefinders -- and virtually never use them, don't even carry them along with me. I think you can develop reasonable skill at estimating the distances. Now if doing a lot of closeup stuff, accuracy is more critical, but a)those folders aren't very good for that, and b) you can use a tape measure!
I do agree the prices on those accessory rangefinders can be scary. certo6 used to periodically auction one and prices used to head toward maybe people thought a camera came with it!