It looks like a Stanley #40 Line Level
https://archive.org/details/StanleyToolsCatalogueNo341914/page/n32/mode/1up
Correct image, wrong name
Straight edge pocket level, for Attaching to framing squares or straight edges.
Line Levels usually attach to a string w two hooks
It does look like the #40 level, how old would it be?
You are right. I used line level when I was doing my google search, and it got locked in my mind.