Ezequias,
The name "layer" is used by the API in a way that can be confusing. Think of a layer as more of a map service in MOST cases. When working with an ArcGISDynamicMapServiceLayer you are not able to get reference to an individual sublayer of the map service by using map.getLayer function. Using ArcGISDynamicMapServiceLayer you can get access to the sublayers visibility and you can set the layer definition but not a lot more. You can not really call this a limitation that is stated in the documentation, it is more of understanding what abilities the ArcGISDynamicMapServiceLayer actually has by reading the docs.