Technically? Yes. It's no different to, say, a polygon with the shape of a D with 5 points viewed edge-on.
A polygon is just a closed shape which has 3 or more vertices and edges. A shape with only two vertices is just a line. Meanwhile a shape with 3 vertices and only 2 edges cannot be a closed shape: most libraries would just join the first and last vertices and make it a closed shape then fill it in; otherwise it's just a series of lines!
As far as your graphics library is concerned, yes it's probably a polygon, but that depends on the library.