Cooking with rancid flour
How "old" are we talking about?  

If the flour was white all purpose flour, was stocked in an airtight container, and your house gets not too hot in the summer I doubt the flour could have gone rancid. Rancidity is the deterioration of fats, and in wheat only the germ contains fat; white flour has been stripped off of wheat germ and therefore is very unlikely that it becomes rancid (anyway rancid flour is unlikely to make you sick)

Most flour deterioration comes from pests like meal moths, but you cannot miss them.

Nevertheless, if the cookies smell and/or taste bad you should throw them