The prohibitions of the Sabbath was prescribed for the Bani Israel by Allah.
Quran 4:154 And We raised over them the mount for [refusal of]
their covenant; and We said to them, "Enter the gate bowing humbly",
and We said to them, "Do not transgress on the sabbath", and We took
from them a solemn covenant.
And those who transgressed it were punished:
Quran 2:65 And you had already known about those who transgressed
among you concerning the sabbath, and We said to them, "Be apes,
despised."
Quran 4:47 O you who were given the Scripture, believe in what We
have sent down [to Muhammad], confirming that which is with you,
before We obliterate faces and turn them toward their backs or curse
them as We cursed the sabbath-breakers. And ever is the decree of
Allah accomplished.
I am not aware of any narration that states that it was only prescribed for a sect among the Jews and that a part of them was exempt. The covenant seems to be from all 12 tribes in the time of Prophet Moses (p.b.u.h).
The Tafsir of 16:124 is that the Sabbath was only prescribed specifically for the Jews, and that after the revelation of the Torah to Moses, and that it was not part of the shariah of Adam, Noah, Abraham, Isaac, Jacob and Joseph etc. Similarly it is not prescribed for Muslims.
My understanding is that the Jewish position is similar and gentiles are not supposed to observe the Sabbath, and it is not part of the Noahide Laws. Responses to this query on Judaism.SE say that gentiles are forbidden to observe the Sabbath.
Hadith in Nisai and Tirmidhi
وَعَلَيْكُمْ خَاصَّةً يَهُودُ أَنْ لاَ تَعْدُوا فِي السَّبْتِ
And for you Jews especially, do not break the Sabbath.
From Tafsir Qurtubi:
أي لم يكن في شرع إبراهيم ولا من دينه، بل كان سَمْحا لا تغليظ فيه، وكان
السبت تغليظاً على اليهود في رفض الأعمال وترك التبسط في المعاش بسبب
اختلافهم فيه
This was not in the Shariah and Deen of Ibrahim, rather it was relaxed
and there was no hardship and strictness in it. The prohibition of the
Sabbath was on the Jews because an argument arose among them
about leaving work and seeking of provision.
Regarding the details of the argument [ "differed over it" ] which led to the prohibitions, it is narrated in tradition that the Bani Israel were offered Friday as their day of observance, but they argued over it and preferred Saturday, so Saturday was prescribed for them and they were deprived of Friday and that was given to the Muslims.
Tafsir Ibn Kathir mentions this (see english translation here):
ويقال إن الله تعالى شرع ذلك لبني إسرائيل على لسان موسى، فعدلوا عنه،
واختاروا السبت لأنه اليوم الذي لم يخلق فيه الرب شيئاً من المخلوقات
الذي كمل خلقها يوم الجمعة، فألزمهم تعالى به في شريعة التوراة، ووصاهم
أن يتمسكوا به، وأن يحافظوا عليه
It is narrated that Allah prescribed through Moses's tongue the
sanctity of Friday for Bani Israel, but they differed about it and
adopted Saturday and thought that creation was finished on Friday, and
nothing was created on Saturday. Hence when the Torah was revealed,
Saturday was prescribed for them and they were commanded to firmly
observe it.
Tafsir Al Qurtubi:
إن موسى عليه السلام أمرهم بيوم الجمعة وعيّنه لهم، وأخبرهم بفضيلته على
غيره، فناظروه أن السبت أفضل؛ فقال الله له: دعهم وما اختاروه لأنفسهم.
[A group says] Moses related to them the command for Friday, and gave
them news of its superiority over other days, but they argued and
debated with him about the superiority of Saturday, so Allah commanded
Moses: "Leave them and what they have chosen for themselves".
Hadith in Sahih Muslim:
قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " أَضَلَّ اللَّهُ عَنِ
الْجُمُعَةِ مَنْ كَانَ قَبْلَنَا فَكَانَ لِلْيَهُودِ يَوْمُ السَّبْتِ
وَكَانَ لِلنَّصَارَى يَوْمُ الأَحَدِ فَجَاءَ اللَّهُ بِنَا فَهَدَانَا
اللَّهُ لِيَوْمِ الْجُمُعَةِ فَجَعَلَ الْجُمُعَةَ وَالسَّبْتَ
وَالأَحَدَ وَكَذَلِكَ هُمْ تَبَعٌ لَنَا يَوْمَ الْقِيَامَةِ نَحْنُ
الآخِرُونَ مِنْ أَهْلِ الدُّنْيَا وَالأَوَّلُونَ يَوْمَ الْقِيَامَةِ
الْمَقْضِيُّ لَهُمْ قَبْلَ الْخَلاَئِقِ " . وَفِي رِوَايَةِ
وَاصِلٍ الْمَقْضِيُّ بَيْنَهُمْ
Messenger of Allah (ﷺ) said: It was Friday from which Allah diverted those who were before us. For
the Jews (the day set aside for prayer) was Sabt (Saturday), and for
the Christians it was Sunday. And Allah turned towards us and guided
us to Friday (as the day of prayer) for us. In fact, He (Allah) made
Friday, Saturday and Sunday (as days of prayer). In this order would
they (Jews and Christians) come after us on the Day of Resurrection.
We are the last of (the Ummahs) among the people in this world and the
first among the created to be judged on the Day of Resurrection. In
one narration it is: ', to be judged among them".