Dexter did not plan on killing LaGuerta at all, actually. It was Debra that ended up striking the final blow, so to speak.
When Dexter is getting rid of Estrada, it turns out to be a set-up by LaGuerta to catch him in the act. Hence the confrontation between the two in the police office.
While LaGuerta is technically an innocent, she is viable to the code as per the first rule of the Code:
Don't get Caught
If LaGuerta were to continue with her investigation of the GPS records of Dexter and Debra's police phones, then she would be able to link them to Travis Marshall's final resting place before the call came into dispatch. Ultimately causing Dexter's downfall.
This, then, allowed Dexter the reasoning he needed to enact his plan of making it look like Estrada and LaGuerta finished each other off, if it weren't for Deb's interference.
As the resulting scene after the container is just them returning to the party. We have yet to see, and will not see until the show returns for it's final season, whether or not Dexter still enacted this plan. Due to Debra contaminating the entire scene with her crying fit over her actions.