A few verses later the text says:
And ye may eat it in every place, ye and your households; for it is your reward in return for your service in the tent of meeting.
Aaron, as the first high priest, is the head of the whole priestly household -- all priests, including future high priests, are his descendants. The text often refers to Aaron by name in these laws, even though the laws are meant to be eternal, not just within Aaron's lifetime. I can only think of one case where his successor is instead named in a commandment (the red-heifer ritual in Numbers 19), and that sounds more like delegation in this instance than a perpetual assignment. I think this text, even though it shortly precedes Aaron's death, is just continuing the pattern of law-giving -- Aaron represents the priesthood, not just himself personally.
Further, there is an important event in the two chapters between this passage and Aaron's death -- the incident with the rock. While Aaron's death is "almost" the next point in the narrative, that death is caused by something in between -- the striking of the rock. It is not until Numbers 20:12 that Aaron and Moshe get told they're going to die in the wilderness. So back in chapter 18, if we assume a sequential chronology, there's no particular reason for the recipients of these divine commands to think that anything is about to change.