Yes, they can (although you'll have to enter it manually as there is no button you can press to do it instantly).
Of course, if the Pokemon you are trying to change's original trainer was not you, you won't be able to change that Pokemon's nickname, even if you are just changing it back to default,