"Possible" is relative. Yes, it's possible to create a software that will take this information from the Client's memory or read the game Window and use OCR to identify the data, but that won't be easy as you'll have to deal with BattlEye and/or some complicated OCR. I doubt such sofware currently exists, so you'd have to program it yourself.
If you're not a programmer then no, it's not possible for you, there isn't a simple method of getting this data.
As for it being legal or not, you'd fall in a gray area. CipSoft has allowed some software in the past that did not really play for you despite reading client memory, but they don't support doing things like that. And if you bypass BattlEye in any way or modify the Client, then it's absolutely against the Tibia rules.