As per this article, it is now possible for third party apps running on iOS 9.3 to add Apple Music track to a user's playlist.
Is there something similar on the latest OSX?