Does WP Rocket work with default permalinks?

No.

It's necessary to have custom permalinks of the type http://example.com/my-post/ rather than http://example.com/?p=1234.