Steps to reproduce
Make a world with cheats enabled
Open to LAN (Cheats disabled)
Try using commands or using command blocks
→ Commands work, but command blocks have no placing animation and no breaking particles and you cannot interact with them (similar to MC-87872 and MC-87877)
Code analysis
The following is based on a custom decompiled version of Minecraft 1.10.2 using MCP 9.31.
This happens because the client thinks the player is unable to use commands and destroy command blocks whereas the server thinks the player is able to use commands and break command blocks because he is the owner.
Client method:
net.minecraft.client.entity.EntityPlayerSP.canCommandSenderUseCommand(int, String)
Server method:
net.minecraft.server.management.PlayerList.canSendCommands(GameProfile)
Related issues
is duplicated by
relates to
Comments

They are off but the player hosting can still run commands. Also theres no breaking animation.

Yes 37a.

Can Confirm this is still a bug.
Had a LAN world for the past few weeks in the latest 1.8, swapped to Pre-3 and I am unable to use or edit command blocks.

A way you can work around this bug is to right-click a command block before you open the world to LAN. Then, you can edit the command block after you open it to LAN.

This is confirmed for 1.12.2

Ok I found and fixed the issue for my mod in 1.12:
In the IntegratedServer.shareToLan() you need to change:
mc.player.setPermissionLevel(allowCheats ? 4 : 0);
to:
mc.player.setPermissionLevel(allowCheats ? 4 : mc.player.getPermissionLevel());
yeah that's basically it that's all you have to do to fix said issue. It's already fixed in my 1.12.2 mod just need that little edit for 1.13
Fixed recently it seems.
Did you have cheats enabled?