
It doesn’t matter whether a footpath is visible or not, you must walk along its course. Sometimes the footpath sign or arrow will give a rough direction, but if you are in a new area or one you are not familiar with then carry an OS map showing footpaths or download the OS map app on your smart phone should you have one and get the map of the area on there.
The farmer has a right to protect his fields, there are several diseases that cattle and sheep can get from bacteria that can be found in dog poo. One of these diseases causes animals to abort foetuses which impacts on a farmers income greatly and I can understand why he was upset. Maybe other people have not been as assiduous as you in cleaning up after their dogs, he wouldn’t know this of course
On the other hand if you were following the correct footpath line and your dog was by your side and not on the grassland, then he has no right to order you off his land as public footpaths are a legal right of way, however an upset farmer is not someone to cross swords with in many instances.
You could report this to you local councils footpath officer of you wanted and perhaps steps could be taken to clearly show the line of the footpath