I cannot answer the question conclusively. As Asdfasdf12 has already mentioned, the iPad Pro has the Smart Connector on the side. This connection is necessary for the keyboard to be powered and therefore work.
I do not have an iPad Wifi 9.7. A mandatory requirement for using the keyboard is that it is physically connected to the iPad. The iPad Pro has three connection points on the side (see the corresponding article on Digitec's website).