All insurers have guidelines as to what they will and won't cover in respect of a claim surrounding pregnancy, and most insurers use the same guidelines.
The only time pregnancy needs to be declared to an insurer is if there have been any complications, and it has not been a straightforward pregnancy - these complications would then be classed as 'pre-existing conditions' and would need to be disclosed.
If a cause was found for your ectopic pregnancy - for example, blocked fallopian tubes, then this 'cause' would need to be declared to the insurer as a pre-existing medical condition.
If you're travelling in advance of any related surgery, only two providers offer 'waiting list cover', meaning they would pay out if you were taken ill 'unexpectedly' (that is, as long as it wasn't to do with simply requiring the planned treatment to be brought forward) in advance of your trip and unable to travel - All Clear and Good To Go.
It's also worth bearing in mind that if you will be travelling with your partner, don't be tempted to take out separate policies. You should take out one joint policy so that you would both be entitled to make a claim should either one of you be taken ill in advance of or during your trip.
More generally, provided a traveller has declared pre-existing medical conditions (and the insurer has accepted them), then these would be covered under an insurance policy, so should an unexpected recurrence occur, or if the condition were to unexpectedly facilitate the need for the trip to be cancelled, then you would be covered to claim.
If there is no cause for the ectopic pregnancy, and it is just one of those unfortunate things that occurs, then there is nothing to declare to the insurer. A traveller having suffered from an ectopic pregnancy should not have any problems buying further travel insurance, nor should they be penalised for having suffered from this previously.
Beth Macer is a travel insurance expert at PayingTooMuch.com