Can I own an existing install of Logic Pro X from a used Mac? I'm looking at buying a used MacBook Pro on that comes with Logic Pro X that's running Sierra.

However I need to roll it back to El Capitan so it will run my UA Apollo console software. It's not yet compatible with macOS Sierra.

My question is, since it's already on the computer, if I sign into my Apple ID before I roll back, will I then 'own' Logic Pro X so I can install it again after I reformat from the Mac App Store?
The app, Logic Pro X in this case but it could be any Mac App Store app, remains tied to the account that purchased it, regardless of the currently authenticated account in the App Store app. Updating the app would require you to enter the Apple ID that purchased the app, and it is not possible to transfer ownership of an app from one Apple ID to another.

If you wish to keep the app, you can copy it to an external drive. The app is still linked to the old Apple ID, but you can use it either from the external drive or by copying it back after you've done whatever you need to do on the internal disk. You'll still not be able to update the app.