Modal Dialog not Opening when not authenticated or in incognito mode
Ajay is correct, the javascript dependencies wont load by default for anonymous users. Here's what I added to my theme.libraries.yml to get it working:

dependencies: 
  - core/jquery
  - core/drupal.dialog.ajax