The short answer is yes; with a caveat. As long as your frosting is non-potentially hazardous, you can use it on your baked goods! The problem is, it's practically impossible to know if a frosting is potentially hazardous or not, without expensive testing.
In our inexpensive e-book we've tested 24 recipes and made the results available to you for a tiny fraction of the cost of testing recipes. You'll find recipes for cream cheese frosting, lemon curd, Swiss meringue buttercream, American buttercream, German chocolate cake filling, and more. You can bake and sell with confidence knowing your products are legally allowed under the cottage food law.