In verses 21 and 22 reference is made to commands contained in the Decalogue. Paul gives the impression that what he means by the law the Jews possessed is the basic, fundamental law of the Old Covenant, namely the Decalogue. This would mean that via general revelation, through creation, God writes ceremonial laws on the hearts of all men. However, the law being referred to here by Paul is more basic and fundamental than ceremonial law. Ceremonial law is revealed after the fall into sin and is not general revelation.
Ceremonial law presupposes the entrance of sin and is aimed at repairing the damage done by sin.
The law of the Gentiles being referred to in this context is a law based on creation not redemption. Therefore, the law that the Gentiles possess via general revelation cannot refer to the Old Testament as a whole or the law of Moses as a whole. It is a law all men possess by nature because all men are created and a law contained somewhere within the whole body of special revelation given to the Jews in the Old Testament. This appears from the language of ver. 15, which would be meaningless if the reference were to special ordinances of worship.