This teaching function of the law would be impossible if man was not able to actively chose between good and bad.
In the Old Testament it is explicitly affirmed when the choice of life and death is placed before men.
Deuteronomy 30: 15-18
"Here, then, I have today set before you life and prosperity, death and doom. If you obey the commandments of the LORD, your God, which I enjoin on you today, loving him, and walking in his ways, and keeping his commandments, statutes and decrees, you will live and grow numerous, and the LORD, your God, will bless you in the land you are entering to occupy. If, however, you turn away your hearts and will not listen, but are led astray and adore and serve other gods, I tell you now that you will certainly perish; you will not have a long life on the land which you are crossing the Jordan to enter and occupy.