In the US. If a police officer enters your home without a warrant and without the permission of someone present – that doesn’t necessarily have to be the homeowner, by the way – then you really don’t have many options.
You are NOT allowed to prevent the officer from performing his duties and you may have no idea why the officer decided to enter your home. They aren’t under any obligation to inform you of their intentions.
What you can do is repeat that you have not given the officer your permission to be in your home and you can ask him to call his supervisor and have them present. You can request your attorney be present and you CAN film him. He has NO legal expectation of privacy in YOUR home. You simply cannot get in his way or impede him from the discharge of his duties. You cannot physically attempt to stop him.
Remember, you have the right to remain silent. You do not have to answer his questions. You certainly do not have to incriminate yourself.
If he finds your marijuana stash, he will have to prove that he had probable cause to be where he was. You are going to lose your stash, but a conviction may be impossible.