Question: "Can I paint over wallpaper?"
Answer: Ideally, we should avoid doing so whenever possible simply because it's difficult to know how the paper was applied, what condition the wall is in underneath, etc. Typically, when wet paint is applied to wallpaper (non-vinyl), the moisture reactivates the glue of the paper and often creates bubbles and unsightly loose spots.
There is hope for rooms when removing paper is not an option. Wallpaper can be sealed with a shellac-based moisture barrier. A good quality primer sealer stain-killer (available at major home improvement stores) is very thin and dries fast, but it also has a strong odor, so only apply in a well-ventilated room. First, tear all loose wallpaper off the wall and sand rough edges. Apply primer sealer stain-killer product, and let dry completely. Then repair walls as you would normally with spackle or drywall compound, prime, and paint.