Yes, you can use both.
Maybe you are confusing it because...
You were told not to use this: "Why did you cut your hair?" - it implies you have cut your own hair yourself.
To get sth done and have sth done both imply you used a professional to receive a service. For example, we're getting our kitchen done. Kate gets her hair done every week at the salon. I'm having my car mended at the garage.
I'm having my IELTS band assessed by my teacher and then getting coaching to receive my desired band score. (That teacher could be me! Check out my profile)
Just one thing - get sometimes implies surprise.
Get is also more informal than have in this construction.
P.S. I grew up in the UK and went to school 40 years ago. At school whenever someone got their hair cut, we would always joke with them.
Who did it! I'll get them for you!
By this, we meant that whoever had done the haircut had made a bad job of it, and we were willing to pick a fight with them on behalf of our friend. We always said this, whether it was a good haircut or a bad one. ;)