Consider this exchange:
Speaker 1: Thank you.
Speaker 2: That's all right!
In this case, speaker 2 is very casually acknowledging that speaker 1 has thanked them. It is somewhat lighthearted. This is similar to, but less polite, than an actual "welcome":
Speaker 1: Thank you.
Speaker 2: Welcome!
These are both very informal and and would not be used in a professional or business setting, or where you do not know the speaker well. It is considered much more polite to say "you're welcome" when you are thanked.
In the second case:
Speaker 1: Thank you.
Speaker 2: All right.
I would not say this, it definitely comes across as rude. In this instance, it is only an acknowledgement that speaker 1 has spoken, without speaker 2 offering any sort of welcome in return. It would be the equivalent of:
Speaker 1: Thank you.
Speaker 2: Ok.
It's always better to be polite in formal situations. I always say "you're welcome" to everyone.
Anyone: Thank you!
Me: You're welcome!
To answer the second half of your question:
When you agree someone's proposal, you would say "OK" or "All right." What is this sentence short for?
Answering someone's proposal with "OK" or "All right" generally means two things:
1) You have confirmed you understand what they are talking about.
2) You are agreeing with their proposal.
It is a colloquial shorthand for saying "I understand and I agree."
I understand we use “I’ll (will)” when we decided to do something at the time of speaking in the former case.
I don't believe this distinction is widely recognized by native speakers.
In any case, the coffee shop person doesn't know or care whether you made your decision on the spot or had decided what drink to have before you came in.
"I'll have an orange juice" would be perfectly acceptable in your coffee shop scenario as well as when visiting a friend.
Edit
Of course it's also fine to simply reflect the form of the question:
Waitress: What would you like to drink?
Me: I'd like an orange juice.
Best Answer
I think there is a scene with Humphrey Bogart where this exchange takes place:
Answering with yes I would will usually result in some further conversation since there is some ambiguity in the answer. Those additional conversations are sometimes best avoided.
The best way to refuse, is simply to say:
which implies you won't buy the other person a drink, but does not directly refuse them.
ADDITION: Of course if someone highly attractive to you asked, you could respond with :
and the conversation will take its natural course...