Is ibuprofen ok to take if you have phlebitis?

Yes. Ibuprofen is a non-steroidal anti-inflammatory drug (NSAID) so it or other nsaids can be used for the pain & inflammation of phlebitis—unless you have a condition that might preclude its use such as bleeding ulcers, clotting disorders, taking Coumadin (warfarin) or other blood thinners.
Yes. Ibuprofen is considered one of the recommended treatments for superficial phlebitis but not deep phlebitis. Nsaid's such as motrin, advil and naprosyn (naproxen) are also used frequently. Wet heat to the area will also give symptomatic relief. It is vey important to prove that your problem is localized and only superficial. I would see a vein specialist for an evaluation and possible venous ultrasound.