Retrieve the Apple ID used to download a given app (in iTunes)
If you can copy something.ipa file to a temporary location and rename it to something.zip, then a standard unzip program will be able to show you the contents of the archive.  In the top folder is iTunesMetatdata.plist, which you should be able to open in a text editor.  Near the top would be a line for appleId, followed by the appleId which was used to download this version of this application.

If multiple IDs have purchased the same application, you would still only have one version on the computer.