I was just about to send my first PhD application to University XXX. I am currently finishing my master's thesis at University XXX. Would it be incorrect to use my university address to apply for PhD positions?. Could it be taken as unrightful use of the "university name"?.
I don't see any possible problem with using your current university email address in your application.
The university issued you this address with the expectation that you would use it to communicate with people inside and outside the university. I can't imagine any way this would be considered "not rightful".
If they do not restrict you in that way, just make sure the address remains in existence for long enough once you have finished your master's thesis - some universities automatically and irrevocably delete their students' accounts including inbox content sooner than expected (e.g. on the day of giving the final presentation ...).
Note that some professors explicitly refuse to receive any e-mails not sent from university addresses (because they expect common, or at least free e-mail providers to sell out address to spammers sooner or later). Universities are probably, to some limited extent, aware of this habit and thus should usually allow their students to contact such professors with their university addresses, including for PhD applications. **
In all, I do not see any reason why this should be problematic with respect to the "university name". If you are afraid that a bad* application of yours might shed a bad light on your university, using the university address should not be any more problematic than writing the name of your university onto the front page of a bad* master thesis, which can then be found world-wide on Google Scholar.
*hypothetical, not claiming this badness applies to you
**Based on a discussion with Bill Barth, I figured that this only works to some extent as in my place, most student issues are handled by other people in the department beside the professor, so there is hardly ever much of a reason for students who do not have a university address (and even for those who do) to contact a professor by e-mail.