To worship means to appoint someone/something as divine. This could be in practice, and it could be in one's intention and in their heart.
When any Muslim says or does something, then under no circumstance would they want to defy their religion and leave the perimeters of faith by ascribing a partner to Almighty God, or do shirk, or claim someone/something as being divine.
Any Muslim would know that there is only 1 God, and He has no partner, and He is the only Divine being.
Merely to say Ya, or Labayk does not mean the individual you are referring to is divine. A genuine seeker of the truth would certainly agree with this.
You can say Ya to God, and you can also say Ya to your neighbour, if you are drowning and seek help, for example. The Quran talks about this, saying Ya Musa (a.s.), and beseeching him, doing what we call istighatha.
To say Ya to someone alive, for the purpose of asking for help, cannot be irrational or haram.
Now, to say Ya to someone who is dead, is that ok?
Of course, we do not beseech help or assistance, or intercession from any person, but rather from those who are closer to Almighty God. Those who are considered as "waseelah" to Him.
And such people do hear us, even though they have departed this world, as the Quran [2:154] says:
Do not consider those who are slain for the cause of God to be dead. They are alive but you are unaware of them.
So, when we say Ya Muhammad, or Ya Ali, etc, it is not taken as worship at all. It does not fall under the category of 'ibadah, so how can it be shirk?
With prayers for your success.