Here is the direct answer. Yes! You can wear a white floral dress to a wedding as long as it is not completely white with some other important elements. You can wear a cocktail-length dress that has a white background that has some colored floral print that is not too heavy and makes you stand out. You should make sure that the dress is not full length and is not directly comparable with the bridal dress at all costs. This is because you should not take away the attention of the bride.
Although we say that it is ok to wear a white floral printed dress to a wedding with some strict elements to follow, some might still think that it is inappropriate. This comes to show that it all depends on the opinion of others which you cannot control.
A friendly note: It is always better to check with the bride about your dress and get her approval if you are trying any sort of white dress for the wedding.
Here are some inspirations of guest white floral dresses that you can wear for a wedding.