Will apple reject my app if I use IOSurface framework for making a video of my app
Yes, if you link IOSurface Apple will reject your app.
Some project on the store are using it but they may load it at run time:
How does the iOS app Display Recorder record the screen without using private API?