Adding additional member to a funded project
However, as it is initially planned that there are only 3 people working in it, which means the funding only covers salary paid to 3, does it mean a new member has to work without being paid?


In good labs, PhD students are not supposed to work for free (although it may happen on occasion). Usually, people added to such a project fall into three categories:


They are funded by the faculty. For instance, the added person could be another professor, for which the faculty pays the salary. Additionally, and maybe more commonly, there are also PhD students which are not paid by external grants. For instance, in Austria / Germany, professors generally have a limited number of "assistants" (not to be confused with Assistant Professors), which are basically PhD students paid y the faculty to assist the professor in teaching, administration and research. Those can be assigned to projects freely. Another possibility of PhD students independent of grants are PhD student positions that a professor has negotiated as part of her/his startup package.
They are funded by another grant, but simply have free resources (time). Clearly, while there are projects that need more resources, there are also projects that are actually overstaffed. In such cases, students will often help out with troubled projects.
They are funded by "soft" money that is not bound to a concrete project. For instance, in my country, many large labs have significant funds saved up from the overheads of previous projects. Occasionally, a strong candidate wants to start a PhD, but no suitable grant is currently open. In that case, the professor will (at least temporarily) pay the student from this saved-up funds. Clearly, this candidate is then not bound to a specific project, and can join whatever project needs her/him most, or whatever project suits her/his interests most.


(I use the term "assigned" very freely above - in reality, students and postdocs are in most labs not so much assigned as asked whether they would be interested to help out in project XY and get a paper or two out of it)