Context. Since massive and intermediate mass stars form in clusters, a comparative investigation of the environments of the young embedded cluster members can reveal significant information about the conditions under which stars form and evolve. Aims. IRAS 18511+0146 is a young embedded (proto)cluster located at 3.5 kpc surrounding what appears to be an intermediate mass protostar. In this paper, we investigate the nature of cluster members (two of which are believed to be the most massive and luminous) using imaging and spectroscopy in the near and mid-infrared. In particular, we examine the three brightest mid-infrared objects and two among these are believed to be most massive ones driving the luminosity of this region. Methods. Near-infrared spectroscopy of nine objects (bright in K bands) towards IRAS 18511+0146 has been carried out. Several cluster members have also been investigated in the mid-infrared using spectroscopic and imaging with VISIR on the VLT. Far-infrared images from the Herschel Hi-GAL survey have been used to construct the column density and temperature maps of the region. Results. The brightest point-like object associated with IRAS 18511+0146 is referred to as S7 in the present work (designated UGPS J185337.88+015030.5 in the UKIRT Galactic Plane survey). S7 is likely the most luminous object in the cluster as it is bright at all wavelengths ranging from the near-infrared to millimetre. Seven of the nine objects show rising spectral energy distributions (SED) in the near-infrared, with four objects showing Br-γ emission. Three members: S7, S10 (also UGPS J185338.37+015015.3) and S11 (also UGPS J185338.72+015013.5) are bright in mid-infrared with diffuse emission being detected in the vicinity of S11 in PAH bands. Silicate absorption is detected towards these three objects, with an absorption maximum between 9.6 and 9.7 µm, large optical depths (1.8 − 3.2), and profile widths of 1.6 − 2.1 µm. The silicate profiles of S7 and S10 are similar, in contrast to S11 (which has the largest width and optical depth). The cold dust emission peaks at S7, with temperature at 26 K and column density N(H 2 )∼ 7 × 10 22 cm −2 . The bolometric luminosity of IRAS 18511 region is L∼ 1.8 × 10 4 L ⊙ . S7 is the main contributor to the bolometric luminosity, with L (S7) 10 4 L ⊙ . Conclusions. S7 is a high mass protostellar object with ionised stellar winds, evident from the correlation between radio and bolometric luminosity as well as the asymmetric Br-γ profile. The differences in silicate profiles of S7 and S11 could be due to different radiation environment as we believe the former to be more massive and in an earlier phase than the latter.