The Web APIs are for metadata (search and lookup) and are unauthenticated so couldn't perform any user specific actions. Libspotify can perform authenticated actions for a user, but it does not currently contain any functionality around following artists.
The Apps API will contain this in the future, but that lives inside the Spotify client and can't be used on a web page outside of Spotify. (It is available in the preview API: https://developer.spotify.com/technologies/apps/docs/preview/views/views-buttons-subscribebutton.html)
In short: No, currently there is not any functionality in any of the APIs to follow artists from a web page.