If I have Minecraft Java on another PC with a different Microsoft account, can I play it on another PC? (For example, by signing in with the other Microsoft account, then starting Minecraft, and then signing in with my other Microsoft account)
Yes, you can also have Minecraft open twice with the same account.
You can do that in the Java Edition, but it would be more complicated with the bedrock.
It's just as easy there. Sign in to the Microsoft Store and then download Minecraft.