The following rare student writing example shows how ‘used not to‘ expresses modality:
PELIC Korean female level 3 grammar class.
*In other words, she did not have permission to drink coffee. Although now she is an adult and can.
In the English Grammar Profile, C2 point 227 in the category of MODALITY is defined as:
negative form ‘used not to’
This is a very rare grammar pattern in iWeb:
1 USED NOT TO BE 57
2 USED NOT TO KNOW 12
3 USED NOT TO MAKE 12
4 USED NOT TO DO 10
5 USED NOT TO HAVE 9