Yes, you could work as a loan repayor and still qualify for forgiveness, if your position was qualified. Bear in mind that most NHSC sites are community health clinics, and most of the repayors are not employed by the fed. It is (or at least it used to be) possible to work in private practice in an underserved (esp. rural) area and receive loan repayment funds. If you were in private practice, you would not qualify. If, on the other hand, you are a USPHS officer, a state or fed employee, etc, you quite likely would qualify for both. As I understand it, NHSC pays you, technically. If someone knows differently, let me know.
However, as it currently stands, it is more likely that you end up paying all your loans via continued loan repayment, unless your total debt is well in excess of $200k.
MD salary, let's say 100k, paying 10% (conservative, that could easily be higher) = 10k/yr for 10 years = 100k. Then loan repayment @ 145k (could be more or less in 10 years), and maybe a rolled over fed primary care loan you received on entering residency at 5% (could be more or less interest when you graduate, this is current). So you've paid 245k on a 5% loan in 10years.