Determining, definitively, whether a given paint was oil or latex has always been a bit of a problem, but an important one as you can paint oil over latex, but not latex over oil unless you use a special 'super adherent primer' first.
I used to recommend taking a bit of paint thinner on a clean contrasting colour cloth and wiping hard. If any colour comes off, it is oil based paint. If nothing happens, it is latex. But that didn't always work. Sometimes if the paint was very old, nothing at all came off.
Now a product has come out that reverses those rules. These swabs have acetone in them and they have no affect on oil based paints, but do take off latex. If the surface is stripped, it is Latex paint. If it just cleans or polishes the surface, it is Oil/Alkyd paint.
Instead of the special swabs you could just use acetone and a contrasting coloured rag, if the paint colour shows up on the rag, it is latex. Acetone will do nothing to oil based paints. Old fingernail polish removers were made with acetone, and many still are -- look for a bottle that does not say 'without acetone'.
You should test it first on a surface that you know is latex paint to be sure you have acetone in your liquid.
By the way, if you really want to paint latex over oil -- you can do it if you sand off the gloss and apply a "super adherent latex primer" first. Then you can continue with ordinary latex paint!
2021 -- We had two products on the show that are no longer available but there are new swab products available; just Google "Lead Test Kits".