I would love to see this implemented also in the stylus, but I do not think it has been done. Additionally, a scroll wheel or touch slider would also be great but that's wishful thinking.
I would try something like Autohotkey mentioned above, or Tablet Pro (also related to TouchMousePointer) in order to achieve what you need.
I presume you are using a drawing application where middle click could be used to drag the page around. Perhaps it might help if you mention which software you are trying to use the stylus with. If you need middle click in a browser, you could hold Ctrl with the stylus tap to open in a new tab. Possibly if you use two fingers and drag you could also scroll the page in some drawing programs.