Writing a thesis

Is it considered ethical for someone to team up with someone else conducting research and such when writing a thesis? I know nothing about higher education just a question.

The thesis itself would need to be solo work, but it’s very common to write something related to research program data that might involve a team of people.

Sometimes I feeel like my son is dropping hints that we could work on something together. Just knowing him like I do if smething even bordered on being unethical he wouldn’t do it. I could help out a lot building the physical aspects that would be needed for testing and such. I would enjoy something like that.

In an education setting it would depend on the professor and what he or she allows. In every other context it would be fine so long as all authors are given credit.