Broadly speaking yes, there are lots of ways to make this kind of design work. The Shimano chain wear tools are an example.
The logic of this kind of tool is that everything between the contact point with the roller and the pin is going to be roughly the same at the first contact point as the second, so they cancel each other out and leave a reading of the pin-to-pin distance, from which you can divide by the number of links to get the pitch.
That logic is better than integrating roller and bushing thickness into the measurement the way that tools like the Rohloff and Park do, but it does mean that there is still some approximation happening. It's not enough to matter in most cases, but what I will note, from working in an environment where the Rohloff tool is predominant whether I like it or not, is that sometimes that tool measures different at different spots of the chain, more than I would expect. Observing that has led me to suspect that total roller and bushing thickness isn't necessarily all that uniform always. It is most of the time though.
The main problems with measuring chains with a ruler is that it makes less trinkets for people to buy, it requires a steady hand and confidence, and since the various cute little tools have become popular, you can look like you're doing something unprofessional in a shop setting if you don't use one. As far as being accurate tools for measuring chains, rulers are unsurpassed. (Unless you count yardsticks, which are more accurate because the sample section is larger, but they're much slower and don't work with the chain on the bike).