Yes. UI shaders are (mostly) independent of the render pipeline; you can use the same shader in built-in, URP, and HDRP for UGUI.
In DirectX9 (early 2000s), textures and samplers were kind of combined. You should prefer the new macros like SAMPLE_TEXTURE2D, but the old tex2D syntax is not going away.
No. If your shader has a .cg file exension, that will be included automatically.
You need to add a sampler variable. When using the macros, instead of having sampler2D _MainTex;, you want Texture2D _MainTex; SamplerState sampler_MainTex;.
You probably mean “if the code in your shader is inside a CGPROGRAM / ENDCG pair”? .cg is not a for shaders, but we still recognise it as a valid include extension.