I have actual holes in my teeth by the gumline. They don't hurt (yet). Are these cavities, and what should I do if I cannot afford a dentist?

Seek help. Holes in teeth are cavities, small localized infections that can spread and become acute problems. You can't afford not to see a dentist. Call your local emergency room and ask for information about low cost dental clinics. Or seek treatment at a dental school where costs are lower. Or ask your dentist to work out a payment plan with you. Dental emergencies are more expensive than dental care.
Go to charity clinic. There is county clinic or charity clinic that would do filling. If your town has a dental school then the emergency clinic is the best bet. A cavity can be done without anesthesia if detected early when it is small. Most of the dentist would help you out if it is small and required a little effort to fill it. I know i would do it for no charge if the person is poor. Do not wait.
Probably. There can be areas that are eroded away that aren't cavities, but if they are holes- they are probably cavities. You should really get an exam, sometimet they will start to hurt. You can pay me now or pay me later, it is best to treat your teeth with the least possible drilling. If you wait until it hurts, it costs more the teeth need more work and it usually hurts the day before your vacaton.I.
Gumline lesions. They are most likely cavities, but they could also be erosions, abrasions or abfractions. If they are cavities, leaving them untreated would be the most serious of the mentions problems. Once decay has broken through the enamel, there is nothing that you can do short of having them repaired by a dentist. They will continue to get deeper & eventual require root canal therapy or extraction.
Fluoride. Obviously the best answer is to see a dentist and have the areas looked at and treated if needed. Short of that you can use a Fluoride mouthwash as well as your normal toothpaste that has Fluoride in it to slow the deterioration of the areas. They will not be healed by the Fluoride but it can help.