It is possible to use ArcPy and Python to write a Python script tool which can be published as a Geoprocessing Service to ArcGIS for Server.
That Python script might be able to pull features from a third party database in real-time but the code to do that would need to use non-GIS libraries.