Is it possible to identify the workspace type (fileGDB or SDE) used in a map service?
Any specific property exposed by the REST API of ArcGIS Server that can help here?
No, not that I'm aware of.
Yes, I think so it may not be possible. Maybe there's an indirect way by using a WHERE sql query that works differently for fileGDB and an enterprise gdb?
One difference I have seen in the SQL between a file geodabase and sqlserver is that a file geodatabase is case sensitive and sqlserver isn't.
if you cannot get this info it from the REST, make it a configuration value.