I am presently writing a campaign setting for Pathfinder 1e, in which several rules from the adventure paths and third-party books are used. For example, it uses rules for modern firearms, and city modifiers from a third party source. All of them are already available for free on d20pfsrd.org. But I want to sell this in a paper book, and would like to include the OGL rules in sidebars for small quotes, and in the main body text if they are too long for a two-page sidebar. Am I allowed to do this, and if so, is there anything that I will need to do to make it compliant, other than list it in the references after the OGL itself?
Yes, you can
What you described is how OGL works (see Pathfinder's OGL), you must put a note with every other OGL reference that you use, usually at the end of the book. For more information, there is an excellent podpast from the guys at the Know Direction podcast talking about third-party publishing and OGL in general.
Publishers only refer to page number and book to save word count, otherwise, they would reprint the referenced rule. We could see this happening a lot on the earlier Pathfinder books, when they were still using 3.x and not their own system. Nowadays, we only see a stat block if that book is no longer in print or if there is any changes, correction or errata since that material was released.