Yes eating unripe avocados can cause constipation if you eat too many of the unripe avocados.
Unripe Avocados contain more tannins and resistant starch than ripe avocados so that is the reason that unripe avocados lead to constipation.
The same is true for unripe bananas as unripe bananas contain more tannins and resistant starch than ripe bananas do as well.
So if you eat unripe bananas or unripe avocados enough then eventually you can get constipated from it.
It's best to wait until the avocados are fully ripe before eating them because they'll not only taste better but they won't give you constipation or possible stomach aches.