I don't quite understand the first sentence. Are you saying you would like to let the person behind you in the supermarket line go first because they only have one ice-cream left?
Assuming this is what you meant, both A and B are correct as far as their usage of "First" and "Ahead". You could either one in this situation. But the sentences need a bit of a re-write:
A. Do you want to go first? They only have one ice-cream left.
B. Do you want to go ahead? They only have one ice-cream left.
A. No, I'm OK. You go first.
B. No, I'm OK. You go ahead.
If this is not what you meant, let us know so we can help.
Student or Learner