Slavery was not a monolithic concept in the ancient world. Some slaves could own money, others could own property, and others only had a tax they had to pay. And although it's tempting to think/believe that only the Israelites were slaves in Egypt, the Torah refutes this idea very clearly. The book of Genesis discusses how Joseph's policies caused nearly the entire population to become slaves during the famine and remain so for a long period of time.
יד וַיְלַקֵּט יוֹסֵף, אֶת-כָּל-הַכֶּסֶף הַנִּמְצָא בְאֶרֶץ-מִצְרַיִם
וּבְאֶרֶץ כְּנַעַן, בַּשֶּׁבֶר, אֲשֶׁר-הֵם שֹׁבְרִים; וַיָּבֵא יוֹסֵף
אֶת-הַכֶּסֶף, בֵּיתָה פַרְעֹה. 14 And Joseph gathered up all the
money that was found in the land of Egypt, and in the land of Canaan,
for the corn which they bought; and Joseph brought the money into
Pharaoh's house. טו וַיִּתֹּם הַכֶּסֶף, מֵאֶרֶץ מִצְרַיִם וּמֵאֶרֶץ
כְּנַעַן, וַיָּבֹאוּ כָל-מִצְרַיִם אֶל-יוֹסֵף לֵאמֹר הָבָה-לָּנוּ
לֶחֶם, וְלָמָּה נָמוּת נֶגְדֶּךָ: כִּי אָפֵס, כָּסֶף. 15 And when
the money was all spent in the land of Egypt, and in the land of
Canaan, all the Egyptians came unto Joseph, and said: 'Give us bread;
for why should we die in thy presence? for our money faileth.' טז
וַיֹּאמֶר יוֹסֵף הָבוּ מִקְנֵיכֶם, וְאֶתְּנָה לָכֶם
בְּמִקְנֵיכֶם--אִם-אָפֵס, כָּסֶף. 16 And Joseph said: 'Give your
cattle, and I will give you [bread] for your cattle, if money fail.'
יז וַיָּבִיאוּ אֶת-מִקְנֵיהֶם, אֶל-יוֹסֵף, וַיִּתֵּן לָהֶם יוֹסֵף
לֶחֶם בַּסּוּסִים וּבְמִקְנֵה הַצֹּאן וּבְמִקְנֵה הַבָּקָר,
וּבַחֲמֹרִים; וַיְנַהֲלֵם בַּלֶּחֶם בְּכָל-מִקְנֵהֶם, בַּשָּׁנָה
הַהִוא. 17 And they brought their cattle unto Joseph. And Joseph gave
them bread in exchange for the horses, and for the flocks, and for the
herds, and for the asses; and he fed them with bread in exchange for
all their cattle for that year. יח וַתִּתֹּם, הַשָּׁנָה הַהִוא,
וַיָּבֹאוּ אֵלָיו בַּשָּׁנָה הַשֵּׁנִית וַיֹּאמְרוּ לוֹ לֹא-נְכַחֵד
מֵאֲדֹנִי, כִּי אִם-תַּם הַכֶּסֶף וּמִקְנֵה הַבְּהֵמָה אֶל-אֲדֹנִי:
לֹא נִשְׁאַר לִפְנֵי אֲדֹנִי, בִּלְתִּי אִם-גְּוִיָּתֵנוּ
וְאַדְמָתֵנוּ. 18 And when that year was ended, they came unto him
the second year, and said unto him: 'We will not hide from my lord,
how that our money is all spent; and the herds of cattle are my
lord's; there is nought left in the sight of my lord, but our bodies,
and our lands. יט לָמָּה נָמוּת לְעֵינֶיךָ, גַּם-אֲנַחְנוּ גַּם
אַדְמָתֵנוּ--קְנֵה-אֹתָנוּ וְאֶת-אַדְמָתֵנוּ, בַּלָּחֶם; וְנִהְיֶה
אֲנַחְנוּ וְאַדְמָתֵנוּ, עֲבָדִים לְפַרְעֹה, וְתֶן-זֶרַע וְנִחְיֶה
וְלֹא נָמוּת, וְהָאֲדָמָה לֹא תֵשָׁם. 19 Wherefore should we die
before thine eyes, both we and our land? buy us and our land for
bread, and we and our land will be bondmen unto Pharaoh; and give us
seed, that we may live, and not die, and that the land be not
desolate.' כ וַיִּקֶן יוֹסֵף אֶת-כָּל-אַדְמַת מִצְרַיִם, לְפַרְעֹה,
כִּי-מָכְרוּ מִצְרַיִם אִישׁ שָׂדֵהוּ, כִּי-חָזַק עֲלֵהֶם הָרָעָב;
וַתְּהִי הָאָרֶץ, לְפַרְעֹה. 20 So Joseph bought all the land of
Egypt for Pharaoh; for the Egyptians sold every man his field, because
the famine was sore upon them; and the land became Pharaoh's. כא
וְאֶת-הָעָם--הֶעֱבִיר אֹתוֹ, לֶעָרִים: מִקְצֵה גְבוּל-מִצְרַיִם,
וְעַד-קָצֵהוּ. 21 And as for the people, he removed them city by
city, from one end of the border of Egypt even to the other end
thereof. כב רַק אַדְמַת הַכֹּהֲנִים, לֹא קָנָה: כִּי חֹק לַכֹּהֲנִים
מֵאֵת פַּרְעֹה, וְאָכְלוּ אֶת-חֻקָּם אֲשֶׁר נָתַן לָהֶם
פַּרְעֹה--עַל-כֵּן, לֹא מָכְרוּ אֶת-אַדְמָתָם. 22 Only the land of
the priests bought he not, for the priests had a portion from Pharaoh,
and did eat their portion which Pharaoh gave them; wherefore they sold
not their land. כג וַיֹּאמֶר יוֹסֵף אֶל-הָעָם, הֵן קָנִיתִי אֶתְכֶם
הַיּוֹם וְאֶת-אַדְמַתְכֶם לְפַרְעֹה; הֵא-לָכֶם זֶרַע, וּזְרַעְתֶּם
אֶת-הָאֲדָמָה. 23 Then Joseph said unto the people: 'Behold, I have
bought you this day and your land for Pharaoh. Lo, here is seed for
you, and ye shall sow the land. כד וְהָיָה, בַּתְּבוּאֹת, וּנְתַתֶּם
חֲמִישִׁית, לְפַרְעֹה; וְאַרְבַּע הַיָּדֹת יִהְיֶה לָכֶם לְזֶרַע
הַשָּׂדֶה וּלְאָכְלְכֶם, וְלַאֲשֶׁר בְּבָתֵּיכֶם--וְלֶאֱכֹל
לְטַפְּכֶם. 24 And it shall come to pass at the ingatherings, that ye
shall give a fifth unto Pharaoh, and four parts shall be your own, for
seed of the field, and for your food, and for them of your households,
and for food for your little ones.' כה וַיֹּאמְרוּ, הֶחֱיִתָנוּ;
נִמְצָא-חֵן בְּעֵינֵי אֲדֹנִי, וְהָיִינוּ עֲבָדִים לְפַרְעֹה. 25 And
they said: 'Thou hast saved our lives. Let us find favour in the sight
of my lord, and we will be Pharaoh's bondmen.'
כו וַיָּשֶׂם אֹתָהּ יוֹסֵף לְחֹק עַד-הַיּוֹם הַזֶּה עַל-אַדְמַת מִצְרַיִם, לְפַרְעֹה--לַחֹמֶשׁ: רַק אַדְמַת הַכֹּהֲנִים,
לְבַדָּם--לֹא הָיְתָה, לְפַרְעֹה. 26 And Joseph made it a statute
concerning the land of Egypt unto this day, that Pharaoh should have
the fifth; only the land of the priests alone became not Pharaoh's.
Source: https://mechon-mamre.org/p/pt/pt0147.htm
As you can see, the book of Genesis states very clearly that everyone in Egypt [except priests] became some type of slave and that this state of slavery continued for a long time.
Since Joseph was able to sustain the Israelites during his lifetime, they probably never had to sell their livestock. And then once the famine was over the Israelites wouldn't be pressured to sell their livestock since food would become available again.
Keep in mind that if most Egyptians are slaves during the book of Exodus like Genesis implies, that means that the Egyptians who gave Israelites silver and gold were also slaves. And just like other Egyptian slaves could have excess gold and silver to give, it's not so surprising that Israelites would have livestock.