Purchase/Install same app on same ios device using different Apple ID without uninstalling
I have an iphone 6 with ios12 (updated to the latest supported version of ios12) and I can not install most of the new or updated apps that require ios13 or higher. I read somewhere that one can try to use his App Store Apple ID to login to a newer ios device that has ios13 or higher and then purchase the app(s) there on that device. Later, use the same Apple ID on the old ios device to download that purchased app(s) to see if there is any last supported/compatible version available for download.
I would like to ask lets say I wanna purchase an app called XYZ and I use my Apple ID to login to a newer device that supports latest ios version (in my case it is ios15 iphone of a friend). If my friend is already using that XYZ app on his device using his Apple ID, then can I log-in in to the App Store on his iphone using my Apple ID and purchase the app there without uninstalling the XYZ app on his iphone while I was signed in using his ID on his device?
iPhone 6, iOS 12