apkmirror.com is a website that keeps a curated archive of android apps (in the apk format used for installation). Now in general I'd avoid downloading from random websites as you've no idea what they might insert into the apk, but these guys do a pretty good job of only including official copies, nothing pirated or cracked, no letting third parties upload apps to their site, and I've never heard of a problem from there.
As for the popup taking you to the Play Store, you could try selecting the Play Store app in your app manager (that's what Samsung used to call it - it's Settings > Apps on non-Samsung devices, but Samsung always change their menus) and seeing whether it has any defaults set. If so clearing them might mean that in future it will ask you which app you wish to use. But it's quite likely that Twitter themselves directly coded a pointer to the Play Store, in which case there is nothing you can do if it happens again except ignore it and find an update yourself.
As for how you find the version, in most apps if you look in their settings there is an "about" option which will tell you the version number. Or if you look in your app manager, select the app and look at its information you should find a version number in there.