You have actually compressed several questions into one.
1.Is there any rule or regulation forbidding the connection? Answer: Unsure. For simple, unqualified connections, lower pressures and diameters probably none. If dangerous fluids, flammable, toxic or large consequences if anything goes wrong: common sense and rules will apply.
2.Any flange has two purposes: being of correct size and form to bear weight and allow correct thightening without deformation (according to norms), and secondly ensure correct compression of sealings.(Sealings correctly adapted to the flange and fluid, temperature etc).
3. If all above is OK, and valve and pipeline properly mounted, aligned and supported correctly you could try. If matching flaanges are too costly or difficult to obtain, I would personally have contacted a company specialised in producing adapted sealings for advice. Under circumstanses it would be wise to even the raised face flange with an extra outer ring of suitable sealing material to obtain even pressure over the whole flat-flange area of the flat-faced sealing.