You can do the signing on the phone (though there is some nuance here as logging in to the account is hard and the techniques used by AltStore involve injection into other Apple software; this is at least theoretically fixable, but does mean that it wouldn't be trivial), but you can't do the installation from another app on the phone in any obvious way (at least without restricted entitlements). AltStore is acting like Xcode doing over-the-network installs from AltServer (and then also happens to do the signing there, but that's again simply to make it easier to develop it).
AltStore is based on the signing code I developed and also used in my Cydia Impactor (which lets you install apps over USB); I actually did develop another tool called Cydia Extender, which would run on your phone, but I dropped the effort when I couldn't get stuff to install on the phone (the technique I came up with relied on an entitlement that was only able to be installed by users with developer accounts; I even somehow failed to notice this until after I released it, which was awkward: I still can't believe I messed up my testing that badly). (Actually... maybe I have a way to pull this off now? It is a long shot, and somewhat risky ;P.)