When I read this question, I first thought that diy.stackexchange.com might have come across this already. I frequent that site for electrical wiring and residential building code questions. Often the questions and answers contain quotes from the relevant codes. The questions/answers on their meta site weren't the most voted on, but they do show some specific answers:
- http://meta.diy.stackexchange.com/q/941/33967https://diy.meta.stackexchange.com/q/941/33967
- http://meta.diy.stackexchange.com/q/532/33967https://diy.meta.stackexchange.com/q/532/33967
One of those answers also mentions that (in the US) since many codes are law, they must be open. This is backed up by the site https://law.resource.org/. This site has free copies of many codes available for free. (Some are currently blocked pending law suits though).
Taking these couple of ideas together, we should feel fairly safe to assume that short quotes from codes are allowable if the proper attribution (code version and section) are given.