That would be my suspicion based on your location. When the heart gets clogged up with heartworms fluids accumulate particularly in the lung area. That can cause coughing, gagging, and weight loss.
You can read about this parasite here
http://marvistavet.com/html/heartworm.html
There is treatment for this but it is only from a veterinarian.
If you can't afford the vet care on your own you might see if financing it would work for you
www.carecredit.com might help. Or you could see if any of these groups would help you
http://www.uan.org/lifeline/resources.html
Or you can talk to your local vet about checking the dog, seeing if it is heartworm that is the issue (it might be something else) and if they will take time payments for the care.
I wish I had an easy home care fix for you but if its heartworm there just isn't one.
Good luck with the little guy!
__________________
Please press Accept if you find my answer helpful. Want more info? Just reply on your question!
Bonuses for good work are always appreciated!
Thanks for the opportunity to help you!