If you see this prompt when trying to delete one of your custom themes it means you have created a theme bubble for this theme, which first needs to be deleted.
More on theme bubbles: Version 9.75: Extended Tasker plugin and theme control
(it’s explained in the first minute of the video)
Without the theme, the theme bubble would break, that’s why the app doesn’t let you delete the associated custom theme. Delete the theme bubble first, then you can remove the theme.
Finding and removing linked theme bubbles
When you look at the list of bubbles in Wear Cloud Editor, theme–bubbles will have this symbol next to them: