Are wakelocks only when screen is off? If so, can I block all third-party app wakelocks since I want the apps to run only when my screen is on?

I understand that this would break some functionality like receiving whatsapp messages when screen is off, but I am fine with it.
Are wakelocks only when screen is off?


No

Quoting from Android Developers


PowerManager.WakeLock defines wakelock



  A wake lock is a mechanism to indicate that your application needs to have the device stay on



PowerManager defines various types of wakelocks



  The following wake lock levels are defined, with varying effects on system power. These levels are mutually exclusive - you may only specify one of them.
  
  



As you can see from the picture partial wakelocks will continue to run irrespective of state of screen. 



  I want the apps to run only when my screen is on?


This should be possible using automation but I haven't tried. Another alternative is using a task killer like [root] Servicely to choose and selectively kill apps when the screen is on. 

Note: Task killers are not recommended for reasons mentioned here Do I really need to install a task manager? and various other answers in task-management tag

For further reading: Wakelocks: Detect No-Sleep Issues in Android* Applications