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?
Quoting from Android Developers
A wake lock is a mechanism to indicate that your application needs to have the device stay on
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.
I want the apps to run only when my screen is on?
For further reading: Wakelocks: Detect No-Sleep Issues in Android* Applications