Is there a way to get a user-defined launchd task (i.e. like the one in this question) to get user confirmation before executing the task? A popup like the one for scheduled sleep (with yes/no and a timer in case of no user input) would be great, otherwise a simple yes/no popup would work.
No as launchd is for daemons and agents that must not interact with the WindowServer. See Apples tech note
You could write a normal app that runs as a login in item