My initial response was also to note peripheral devices are UI components for system programs, and then realized he likely meant the UI is part of the programming within applications. That's why it's a good distinction. Also to your point on system dependence, even if they're not picky, applications are dependent on system programs to functions. That's another good distinction.
You're cutting the lines at the wrong points. A program which includes a UI is an application. It's really that simple.
The UI includes pure output calls as well (like to the screen).
There are plenty of non-application programs which are dependent upon system functions, as well.
NOW, if you start getting into the etymology of API (application programming interface) it is quite clear that this was not
the only definition. Back end functionality can expose APIs, either to applications proper or to other non-user based programs.
As far as I can tell, that definition is essentially synonymous with program.