Some of the Rabbis are talking about a first generation of priests that was replaced by Aaron and his descendants. More specifically in Midrash Rabbah - Bamidbar 4:8 and in Midrash Rabbah 5:7 we find that starting with Jacob who purchased the birthright in order THAT HE MIGHT SERVE GOD, these "priests" were the first born males from Exodus 13:1-2, replaced later on with the Levites (Numbers 3:12-13). Same commentaries are saying that originally the firstborn were "priests", but because they committed the sin of the Golden Calf, the Levites and Aaron&co were privileged to enter in their stead. Exodus 19:22-24 is just before the Golden Calf episode, so perhaps it does make sense.
Of course, there is also an explanation according to which Exodus 19:22-24 is either an anachronism or is a fragment from a different strand of priestly tradition.
Please find below a fragment from the interesting Midrash, according to which „firstborn” is rather a title or even something like a sacramental function:
Noah arose and offered a sacrifice, as it says: And he took of every clean beast... and offered burnt-offerings on the altar (Genesis 8:20). Noah died and transmitted them to Shem. But was Shem a firstborn? Japheth, surely, was the firstborn, as it says: Shem... the brother of Japheth the elder (Genesis 10:21)! Why then did he hand them on to Shem? Because Noah foresaw that the line of the patriarchs would issue from him. There is proof that Shem offered sacrifices, since it says: And Melchizedek, king of Salem brought forth bread and wine; and he was priest of God the Most High (Genesis 14:18). Now was it to him that the priesthood was given? The priesthood, surely, was not given to any man until Aaron arose. What then is the meaning of the statement here, "and he was priest"? Because he offered sacrifices like priests.
Shem died and handed it on to Abraham. But was Abraham a firstborn? The fact is that because he was a righteous man the birthright was transferred to him, and he offered sacrifices, as it says: And offered him up for a burnt-offering in the stead of his son (Genesis 22:13).
Abraham died and handed it on to Isaac. Isaac arose and handed it on to Jacob. But was Jacob a firstborn? No; but you find that Jacob prudently took it [the birthright] from Esau. He said to him: "Sell me first your birthright" (Genesis 25:31). Do you suppose perhaps that it was for no good reason that Jacob asked Esau to sell him the birthright? No! Jacob wished to offer sacrifices and could not, because he was not the firstborn.
Midrash Rabbah - Bamidbar/Numbers 4:8
And there is also this story of Jethro, Moses' father-in-law. Jethro is introduced as "the priest of Midian" (Exodus 18:1). Not Jewish, don't know if firstborn of any sort. Later on, after hearing Moses' story, Jethro declares: “Praise be to the Lord ... Now I know that the Lord is greater than all other gods" (18:10-11) and brings "a burnt offering and other sacrifices to God. And Aaron came with all the elders of Israel to eat a meal with Moses’ father-in-law in the presence of God." (18:10-12) Perhaps is this a ritual of "ordination"?