Short answer: yes. Longer answer: in the case of organic posts, there is no strict rule. But Facebook prefers having text in the post itself and no or little letters in images, and it could have an impact on the organic reach. On the other hand, we have examples where posts with some text in images were more successful than with no text.
In the case of boosted posts or ads, initially, there was a rule that text must not be in more than 20% of the image. It is no longer valid. Nevertheless, even if the post will be allowed, the text in images could affect the reach of the post and how much you finally pay for the conversions. Facebook offers Text overlay tool that you can use for checking your images. And moreover, there are even some exempts: movie posters, book covers, album covers, product images (where an entire product can be seen, and not just a zoomed-in image of the product), posters for concerts, music festivals, comedy shows or sporting events, text-based businesses like calligraphy, cartoon/comic strips, etc., app and game screenshots, legal text, and infographics.