Hi Olivier,
The reason the code works in MapImageLayer and not TileLayer is because you're creating a dynamic sublayer in the constructor of the MapImageLayer. This is technically a new sublayer and a powerful capability of MapImageLayer.
However, TileLayer has sublayers that are readonly. So when you use the same snippet, you're actually attempting to create new sublayers within the constructor of the TileLayer. Since sublayers is a readonly property, you will see an error. However, you can still modify properties like popupTemplate, popupEnabled, and legendEnabled on existing sublayers. You just need to modify the code a little bit to get the proper sublayer. This should work in your app:
var SA_Innondation = new TileLayer({
url:"https://sig.gironde.fr/arcgis/rest/services/APP/sa_inondation_v_1_0/MapServer/",
title:"Sensibilité Aléas Inondation"
});
var sublayer = SA_Innondation.findSublayerById(0);
sublayer.popupTemplate = {
title: "{ppr_label}",
content: "{risq_2015}"
};