Hi there, I hope I can help you and this little homeless boy tonight. Many jurisdictions have an animal welfare agency (goes by different names in each area) that can take him in and provide appropriate care even after hours. If they are not open, they often refer people with sick animals to local emergency hospitals that can provide emergency care overnight and get him to the shelter when they open. You can find the name and contact information for your local agency online by searching for animal welfare and your city/county name. If you are unable to find it this way, you can call the NON-emergency number for your local police department as they can direct you to the right place.
In the meantime, some pet stores will carry flea and tick products over the counter and you can purchase the appropriate product with the help of your local pet store staff. Some products will kill ticks that are already attached and some will simply repel ticks so the sales people should be able to help you chose the right product among those that they carry. Alternatively you can remove the ticks manually by grasping them at the base (as close to the dog's body as possible) and gently pull them out. After doing so, you can drop them into alcohol or crush them to make sure they don't attach to you or other pets in the house. Bathing him in Dawn dish soap or baby shampoo can help in the short term and remove fleas or other pests that are contributing to his condition without being too harsh for his skin. Be careful not to get into his eyes as this can irritate the corneas and cause ulcerations.
Ultimately, it sounds like he should be evaluated by a veterinarian as he may have other disease processes going or he may be malnourished from being on his own and not being cared for. If you have the means, I recommend taking him to your local emergency clinic if you are unable to get him to the proper authorities for care. If you are unable to get him to a vet tonight, you should take him in first thing in the morning.
Good luck!! Thanks for trying to help out this little guy, he's lucky to have found you. If I have answered your question to your satisfaction, please rate me so that I can be compensated appropriately. If you have further questions, please feel free to let me know.