You, as the project owner, have full control over who's allowed to edit a project, regardless of whether the project is public or private. Although public projects can be accessed by anyone, only contributors added to the project by the owner will be able to edit them.
With personal projects, all contributors have edit access. If you want to restrict some people to have view-only access, check out our Organization accounts, which give you more fine-grained control over access.