A novel highly selective sensitive optical sensor was prepared via the chemical immobilization of β-2-hydroxybenzyl-5-bromo-2-hydroxyazastyrene (HBBHAS) on an epoxy-activated agarose membrane pieces. The absorbance variation of the immobilized azastyrene film on agarose upon the addition of 1.5 × 10−5 M aqueous solutions of La3+, Y3+, Al3+, Sc3+, Sm3+, Eu3+, Lu3+, Fe3+, Ce3+, Cr3+, S2O32−, Tb3+, Mn2+ and KIO3 revealed substantially higher changes for the Yb3+ ion compared to the other considered ions. Thus, using HBBHAS as an appropriate ionophore, a selective optical sensor for Yb3+ was prepared via its chemical immobilization on a transparent agarose membrane. The effects of pH, reagent concentration, and time duration of the reaction of immobilizing the reagent were examined. A distinct change in the maximum absorbance of the reagent was established on contact of the sensing membrane with Yb3+ ions at pH = 4.25. For the membrane sensor, a linear relationship was observed between the variation in membrane absorbance (ΔA) at 424 nm and Yb3+ concentrations in the range of 4.75 × 10−5 to 6.20 × 10−10 M with a detection limit of 1.9 × 10−10 M for Yb3+. The effects of some potentially interfering ions on the assessment of Yb3+ were analyzed, and no substantial interference was found. The sensor showed a short response time and decent durability with no reagent leaching. The recovery of Yb3+ ions from the sensor material was performed using 0.3 M HNO3 and its response was reversible and reproducible with RSD ≥ 1.95%. This study reports a non-toxic, economical, stable, accurate, easy-to-use, and novel optical sensor material to assess Yb3+ in synthetic and environmental water samples.