Identify which apps on ipad belong to another account for which I do not have the password?
This script run on my Mac having iTunes showed the account for each IPA-file.  

for f in ~/Music/iTunes/Mobile\ Applications/*.ipa;  do (echo "$f" ; unzip -p "$f" "iTunesMetadata.plist" |  plutil -p - | egrep -i "\"(itemName|artistName|AppleID)\"" ) |  perl -e 'while (&lt;&gt;) { if (m!^/!) { chop; $fqn=$_; } if (m/"(.+)" =&gt; (".+")/) { $e{lc($1)}=$2; } } print "$e{\"appleid\"}\t\"${fqn}\"\t$e{\"itemname\"}\t$e{\"artistname\"}\n";'; done|sort|less


It is an adaptation of the script shown in https://apple.stackexchange.com/a/256278/3157