It's OK for a student to pay for or acquire services to create their entire dissertation as long as they provide the topic.
It's OK for a student to pay for or acquire multiple consulting/advising services (e.g., statistical, copy editing, research design) as long as they have done some amount of creative work (e.g., lit review/hypothesis development).
It's OK for students to use one or two consulting services (e.g., statistical consulting or writing help) as long as they do all the technical work (e.g., the actual writing or running statistical code.
Only advisers and fellow students should help/consult someone writing their thesis or dissertation, but they can do editing or help with specific analyses.
Only advisers and students should help, and that help should only be conceptual/motivational.
No amount of help is ethical. A thesis or dissertation should be 100% independent work on both creative and technical dimensions.