Finite-size effects on the ferroelectricity in rhombohedral HfO$_2$