I once researched using crickets and other terrestrial arthropods as food for octopus and cuttlefish. Amazingly, crickets are taken readily by both young octos and cuttles. Of course, you have this little problem in the drastic difference in environments the prey and pedator come from.
Cephalopods are one of the oldest groups of animals that inhabit this earth- predating insects by about a gazillion years. Can a cephalopod gain any usable nutrition from an insect? It's hard to say- so little is known. I believe James Wood did a quick nutritional analysis of crickets and cockroaches, but I don't remember the results of that study.
As for instinctually knowing that ladybugs are toxic...I'd doubt it. When in all of evolutionary history have octopuses encountered ladybugs on a level that an evolutionary shift could occur?
I understand that most terrestrial predators find ladybugs taste bad. Octos are very big on tasting food before devouring it, so if cephalopods have similar tastes as finches, I'd bet the octopus spit it out. (somebody pilot a study on feeding fiddler crabs and crayfish to finches!!!!

)
I'd just call it an accident and not worry about it. Far worse things have fallen in my octopus tank without incident- including an iguana.
Cheers, Jim