In Germany, is it possible for a PhD student to be co-supervisor of a master thesis?
By and large, yes.
The conditions for master thesis supervision are specified in the examination regulations of the considered department. Generally, there is a big variety between the regulations of different departments, so it's always worth having a look at them.
In all cases I'm aware of, PhD students can act as co-supervisors of master theses. Usually it's required that a professor is formally specified as the main advisor, both in the formal proposal and on the title page of the thesis document. The PhD student can be specified as an co-advisor on the title page.
Yes, with some notes on terminology here (from a viewpoint of computer science, in case there are differences by discipline):
Prüfer: In Germany, the person who is formally in charge of the thesis on the university's side is typically called the "Prüfer" (literally: the "examiner"). This is usually a professor. They are the one who are logged as the official person supervising and grading the thesis in the exam office.
In practice, it is well possible the student never has any contact with the Prüfer except during the final presentation/defence.
Betreuer: Then, there typically is a "Betreuer" (literally: the "adviser" or "tutor"). They have likely had some influence on the thesis topic (if it wasn't them writing down the task description in the first place - to be greenlit by the "Prüfer"), will regularly be in touch with the student (e.g. by means of weekly status meetings), and has a deep understanding of the topic the student writes about.
This "Betreuer" may very often be a doctoral candidate whose own work (either their doctoral thesis research or some project their position is funded from) is in some way related to the Bachelor/Master thesis - as in, the Bachelor/Master thesis could be seen as a sub-project of the "Betreuer"'s topic, which the "Betreuer" may then be able to cite in their own work.
Authority of the "Betreuer": Behind the scenes, the "Betreuer" will write a brief report and grade suggestion for the "Prüfer" at the end of the thesis, often including not only aspects from the resulting thesis document, but also the general impression of the student's enhusiasm and skill level when it came to driving the Bachelor/Master thesis forward. Other than that, the "Betreuer" will take little "administrative" action on their own in that if anything goes wrong (student refuses to communicate, thesis task proves unsolvable, ...), they will usually consult with the "Prüfer" on how to proceed.