A molecule might be an oxidising agent under the electron transfer definition, and simultaneously be a reducing agent under the alternative definition: i.e. that reduction is a loss of oxygen or a gain in hydrogen.
For your specific question, formic acid can be deemed to be an oxidisation agent since it loses a hydrogen during protonation of another molecule. The really silly way to think about this is following deprotonation, formic acid has a higher percentage of oxygen than it did before, i.e. it possesses more oxygen than before.
The case of formic acid being a reducing agent is due to the more modern definition of electron transfer. To see the mechanism of this for clarity, see here. It's clear that the formic acid is donating an electron pair (i.e. itself is being oxidised) and is making the other molecule accept those electrons (i.e. that molecule is reduced). The formic acid is therefore a reducing agent.
So your original issue is due to two different definitions of oxidisation and reduction which still exist to this day, and which are by no means mutually exclusive!
EDIT: Of course, the case of formic acid is more simple because it isn't the acid doing the reducing, it's its conjugate base i.e. formate. So formic acid is an oxidising agent under the proton definition, yet formate is an reducing agent under the electron transfer definition.