Hey Jireh! Great question! It's super important to understand what is copyright & ownership in regards to your rights and usage of any type of product like beats, artwork, or even general business agreement rights.
In short, a typical royalty free license grants the producer the non-exclusive right to use those sounds. What that means is that the producer is allowed to use the sounds based on this agreement, but other producers can also buy those sounds and use them, too.
The words royalty-free mean that the creator of those sounds does not have the right to monetize from the producer's work.
The producer purchased the sounds, the agreement is a non-exclusive royalty free license, where the producer has the right to use the sounds to make their beats and sell their beats at their own leisure. (This is a typical non-exclusive royalty free license).
You as the artist rapping over a beat, whether that be a lease (non-exclusive), or exclusive beat, will not be at fault for any such breach of contract clauses, however, it is wise that you do ask such questions so you know your producer is setting them self up for success.
What you're asking is an agreement between the sound designer and producer.
The agreement you have between the producer and yourself is now a separate agreement, and it would probably be wise to have a clause in there that you are not responsible for such breach of the producer to any other parties that they have entered into agreements with.
Do not take my words as legal advice, seek professional advice from a real music lawyer before entering into such ventures.
I must say that so I am not providing any legal advice to you.
That's the general idea behind your question.
In recent years I have seen "royalty-based sample packs", where the producer is required to pay the sound designer royalties.. but it is not as common, and I'd personally avoid that route, as industry standard has usually been royalty-free drum samples where the producer purchases their sound, then has the right to use those sounds in their beats, without having to pay royalties back to the sound designer.
Of course, the producer is not allowed to resell the sound pack, or sounds within, modified or not individually.. producers can only use them to make music etc.