Processes can be patented. The law is "any new and useful process, machine, manufacture, or composition of matter, or any new and useful improvement thereof". A serious of steps is a process so call it a process, do not call it an algorithm. Algorithm has the flavor of something abstract and sets off alarm bells.
Also - there is nothing about external visibility that affects the patenting process. You may have business reasons for protecting some steps that are visible or are visible. Invisible steps can also be protected as trade secrets.
You can't patent an algorithm for converting a BCD value in a computer into a 2's compliment equivalent. It is abstract and doesn't do anything.
The courts have gotten to calling all kinds of things abstract and unpatenteable that were clearly patentable a few years ago. To get your invention through the system might be impossible, easy or only possible with skilled drafting.
If you get a patent, yes, it will allow you to try to use the courts to stop others from infringing on your granted claims - that is he whole point of a patent.
What if they just modify it a little bit?
To infringe a patent claim one must do each and every step in the claim (or a very close functional equivalent); so you need to try to get a claim allowed on the steps that really make your solution superior and define those steps a broadly as possible while not being indefinite or overlapping prior art.
Do I need to build the app first?
The patent office stopped requiring prototype models in the 1800's. A prototype is not needed for patentablity but a clear vision of how it works is needed.
For business reasons it might be advisable to prototype and beta test it with users to get feedback to improve it and maybe change the aspects you decide to patent. Beware that distributing it without an NDA from each user will break novelty. In the U.S. that gives you a year to file and in most of the rest of the world precludes you from ever filing.