Yes you can!
But where you are trying to add? Its a web page, desktop or Android?
If you are working on web you can use ArcGIS API for JS and you can add a portal layer using following code.
// Creates a layer from a Portal layer item id
Layer.fromPortalItem({
portalItem: {
id: "af1ad38816814b7eba3fe74a3b84412d"
}
}).then(function(lyr){
// Adds layer to the map
map.add(lyr);
});
You can find the details here and here also
For Android
If you are developing an Android application you can use ArcGIS Runtime SDK for android and you can use this class