Is there a way to turn off flat UI in MacOS Sierra?
No, you can't revert back to the UI of previous versions of OS X with Apple's tools.

You can, however, make the UI elements stand out more.



macOS Sierra: Increase the UI's contrast


Open System Preferences > Accessibility > Display
Tick the checkbox "Increase contrast"




Description


  Increase contrast
  
  Increase the contrast of items on the screen (such as borders around
  buttons or boxes) without changing the contrast of the screen itself.


Source: Apple.com