Hello, my name is***** and I have over 20 years of experience as a veterinarian.
I am sorry to hear about your girl's intermittent cough.
If her intermittent cough is seeming to linger without any nasal or eye discharge a bacterial or viral infection seems very unlikely.
A dry cough can be a sign of heartworm disease. The most common symptoms for heartworm disease in a cat are coughing or gagging/vomiting. A simple blood test will help diagnose heartworm.
Another possibility, especially if she is allowed outdoors to hunt, is a lungworm infection. These can be more difficult to diagnose but checking several stool samples for eggs or trying a course of fenbenadazole (Panacur) worming medication may be diagnostic if she gets better after taking the wormer.
Of course the other possibility is feline asthma. We can usually diagnose asthma with radiographs of the chest when the kitty is showing symptoms. But if we don't catch her during an episode sometimes radiographs can look clear.
Heart disease is another possibility but I would her to be sicker with heart disease, and her cough to be more consistent. If she seems relatively normal otherwise, eating and drinking well, no sign of weight loss, and active as usual than heart disease is less likely.
It would be very reasonable to check a heartworm test as well as a stool sample and worm her with fenbendazole. If those aren't diagnostic and she isn't improving the next step would be to take chest radiographs and look for changes consistent with asthma and compare them to the previous ones taken to see if there have been any changes, if she has ever had radiographs taken before.
If her radiographs look suspicious for asthma or even if they look clear when she isn't coughing then trying a course of bronchodilators (oral like theophylline or inhaled) and inhaled cortisone (like fluticasone). In most cases inhaled formulation of both drugs work best. In some cases your veterinarian may start with an injection of steroids to get her some immediate relief. Inhaled formulations can work directly on the lungs, and thus tend to work better in the long run, and because they aren't systemic they have less side effects.
Rarely a nasopharyngeal polyp or a fungal infection can be the cause of a cough, so looking further with sedation and a nasal scope, as well as a look behind the soft palate may be needed, if she isn't coming along.
There aren't any good over the counter medications to give a cat with a cough, other than a wormer like fenbendazole (Panacur) which can be purchased at a pet store, but hopefully I have given you the information you need to approach her cough and the diagnostic testing that will help pin the cause down and get her appropriate treatment.
Best of luck with your girl, please let me know if you have any further questions.