So, you want to use your own ArcGIS Server service in the javascript API? If that is what you want to do then yes you can use your own service, just make sure that the spatial reference matches the map.
However, if you want to use a non ArcGIS Server service then you will need to get the data back and create a graphics layer from the data.