I think the node knows all of it's peers blockheights so when you start a node and it starts connecting to peers it will know the block height of all it's peers and you'd be able to query that with getpeerinfo. It would however be busy updating itself. You won't have to wait until it's done though.
Well, the point is that I don't want to store the whole hundreds-of-megabytes blockchain. So I'd need to periodically delete the file?
And since getpeerinfo gives me the starting height (which, I assume, is the height at the time of connection), I'd need to de- and reconnect the wallet periodically too? Not a very good idea for my application