According to Law 39/1981 of 28th October 1981 (Boletín Oficial del Estado no. 271 of 12th November 1981), official entities must display the flag with coat-of-arms. The variant without the coat of arms appears to be used as a cheap alternative.
Spain has only one national flag and ensign, the one with coat-of-arms. Any merchant or fishing ship can fly the coat-of-arms version. Many don't, just because the cost of a flag with a colored coat-of-arms is much higher than one without it.
There are two separate questions here.
The 1978 Constitution says :Article 4
1. The flag of Spain is made of three horizontal stripes red, yellow and red, the yellow one being twice as wide as each of the red ones.
The Flag Act no. 39/1981 of 28th October 1981 (published on
the Boletín Oficial del Estado no. 271 of 12th November) says however
in Article 2
1. The flag of Spain, according to what is specified in article four of the Spanish Constitution, is made of three horizontal stripes red, yellow and red, the yellow one being twice as wide as each of the red ones.
2. The yellow stripe may bear the coat-of-arms of Spain in the way which shall be legally approved. The coat-of-arms of Spain shall appear anyway in the flags to which paragraphs 1, 2, 3 and 4 of the following article refer.
Paragraphs 1 through 4 of article 3 refer to buildings and facilities of the national, autonomous, provincial or island governments and local councils; buildings, ships and planes of the Armed Forces and of the national police corps (National Police and Civil Guard); and buildings and official vehicles of diplomatic and consular missions.
The civil flag of Spain may bear the coat-of-arms whereas the state and war flag must bear it always.
The official Spanish Navy flag regulation still valid today dates from 21st January 1977 (Real Decreto 1511/1977, de 21 de enero de la Presidencia del Gobierno —Boletín Oficial del Estado núm. 156 de 1 de julio— por el que se aprueba el Reglamento de Banderas y Estandartes, Guiones, Insignias y Distintivos). Title 1, Rule 1 deals with the national flag (bandera nacional): this has the plain three stripes and no coat-of-arms. Under the chapter "Use" of this flag one word only is written: "General". So there is no doubt that this plain bicolour flag is the national flag and may be used everywhere by everybody as he pleases.
This has been repeated by the 1981 flag act. Rule number 2 of the Navy Regulations deals with the coat-of-arms, Rule number 3 with the "national flag with the arms of Spain" (bandera nacional con escudo de España). Under Chapter 3 concerning the use of this national flag with coat-of-arms is written, "warships, arsenals, Navy stations, their castles and fortresses, as well as any others on the coast, airports, campments, quarters and other military dependencies. Offices and buildings belonging to the administration of the state including those abroad which may have extraterritorial status." The 1981 flag act allows the use of the flag with coat-of-arms by everybody else as well as the navy.
The Navy and any official, military or governmental office or building will fly a national flag with coat-of-arms, while both a flag with coat-of-arms or one without coat-of-arms may be flown at any other places legally by anybody. This includes the ensign of the merchant navy, which is a plain bicolor flag . Almost all fishing boats, passenger ferries, merchant ships, trawlers etc. fly the plain bicolour, while all yachts fly the official yacht ensign and all Navy ships fly the flag with coat-of-arms.
The Spanish flag