Hello again Maleeha!
Well, since you ask, it's gonna be lengthy but bear with me. First, keep in mind that:
1. Individual cases may differ however, it's unlikely.
2. Take information that I present here with a grain of salt i.e. you may still seek advise else where.
Now, as a general rule, Yes, it's illegal to work in KSA without a proper work Visa and you can't get a work Visa without a sponsor (Kafeel). With that being said, Yes it's illegal for them to give you an offer letter if they are not willing to sponsor you.
The Saudi government has made it very complex for the companies with the introduction of Saudization rules also known as the "Nitaqat". Under the law, Saudi employers are now required to have a certain percentage of Saudi nationals as employees. If this specific employer of yours has a total of 9 or less employees, including after you are inducted, then they are exempt. However, this exemption doesn't mean you don't need a work visa, you still do, it's just less hassle for them.
You have 2 options, well 3 but 3rd is not really an option which I will explain.
1. Exit Saudi and go back on a work Visa. Of course this means you need to discuss the matter with this or other potential employers and they should be willing to sponsor you and bring you back.
2. Transfer your Iqama, i.e. from being a dependent to a work status. This is again something only your employer can do. Your potential employer will have to initiate the request with the ministry of labour and your current sponsor, Husband, Father etc, will have to give their consent known as the no objection certificate, as well. This process will probably take around a month and the costs are around 8000 SAR that your employer must pay to the ministry.
3. Work illegally on low wages and risk heavy fines including the deportation of both, you and your current family sponsor. This is highly risky these days and I would highly advise against it.
I will conclude by saying that the final way of escaping all of the hassle above, which was introduced in 2019, is to buy the Premium Iqama, which also serves as permanent residency. The cost is heavy, 800,000 SAR at once that you will have to invest in Saudi or 100,000 SAR annually and your premium iqama will be renewed each year. There's no limit in my knowledge with the annual option and thr money will have to paid as renewal fees each year.
Now you should be able to discuss point 1 or 2 above with this or other potential employers regarding your sponsorship. Let me know if you need further information. I will definitely help if I have any knowledge about it.
Wish you all the best!